open-research-protocol 0.4.21 → 0.4.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cli/orp.py +10 -1
  2. package/package.json +1 -1
package/cli/orp.py CHANGED
@@ -3443,6 +3443,9 @@ def _hosted_api_error(
3443
3443
  payload: dict[str, Any] | None,
3444
3444
  ) -> HostedApiError:
3445
3445
  message = str((payload or {}).get("error") or (payload or {}).get("message") or f"Request failed: {status}")
3446
+ stripped_message = message.lstrip()
3447
+ if stripped_message.startswith("<!DOCTYPE html") or stripped_message.startswith("<html"):
3448
+ message = "Hosted ORP returned an HTML error page instead of JSON"
3446
3449
  suffix = f" (status={status} path={path})"
3447
3450
  hint = ""
3448
3451
  if status == 401:
@@ -3450,7 +3453,13 @@ def _hosted_api_error(
3450
3453
  elif status == 403:
3451
3454
  hint = " The hosted ORP app rejected the operation. Check permissions on the target record."
3452
3455
  elif status == 404:
3453
- hint = " The hosted record may have changed. Re-list the resource and retry."
3456
+ if message == "Hosted ORP returned an HTML error page instead of JSON":
3457
+ hint = (
3458
+ " The hosted API route may not be deployed at this base URL. "
3459
+ "Check ORP_BASE_URL or deploy the hosted ORP app."
3460
+ )
3461
+ else:
3462
+ hint = " The hosted record may have changed. Re-list the resource and retry."
3454
3463
  elif status == 409:
3455
3464
  hint = " The hosted record changed since you last fetched it. Re-open it and retry the update."
3456
3465
  return HostedApiError(f"{message}{suffix}.{hint}".replace("..", "."))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-research-protocol",
3
- "version": "0.4.21",
3
+ "version": "0.4.22",
4
4
  "description": "ORP CLI (Open Research Protocol): workspace ledgers, secrets, scheduling, governed execution, and agent-friendly research workflows.",
5
5
  "license": "MIT",
6
6
  "author": "Fractal Research Group <cody@frg.earth>",