diff --git a/tests/remote/unit/snapshots/route_error_replies.json b/tests/remote/unit/snapshots/route_error_replies.json new file mode 100644 index 00000000..56670d6b --- /dev/null +++ b/tests/remote/unit/snapshots/route_error_replies.json @@ -0,0 +1,4044 @@ +{ + "DELETE /api/dashboard/drain no key": { + "body": { + "message": "Dashboard key is invalid.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "DELETE /api/download/jobs/{job_id} no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "DELETE /api/history/{job_id} no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "DELETE /api/session/{session_id} no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "DELETE /api/session/{session_id} plain before the handler's try": { + "body": { + "error_code": "INTERNAL_ERROR", + "message": "Internal server error (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "raised": true + }, + "status": 422 + }, + "DELETE /api/session/{session_id} unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 DELETE /api/session/pinned-session service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "DELETE /api/session/{session_id} wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 DELETE /api/session/pinned-session service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "GET /api/config no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/dashboard/cdm-logs no key": { + "body": { + "message": "Dashboard key is invalid.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/dashboard/events no key": { + "body": { + "message": "Dashboard key is invalid.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/dashboard/health no key": { + "body": { + "message": "Dashboard key is invalid.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/dashboard/jobs no key": { + "body": { + "message": "Dashboard key is invalid.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/dashboard/keys no key": { + "body": { + "message": "Dashboard key is invalid.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/dashboard/logs no key": { + "body": { + "message": "Dashboard key is invalid.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/dashboard/services no key": { + "body": { + "message": "Dashboard key is invalid.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/dashboard/sessions no key": { + "body": { + "message": "Dashboard key is invalid.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/dashboard/sessions/{session_id}/logs no key": { + "body": { + "message": "Dashboard key is invalid.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/dashboard/status no key": { + "body": { + "message": "Dashboard key is invalid.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/download/jobs no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/download/jobs/{job_id} no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/download/jobs/{job_id}/events no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/env/check no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/health no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/history no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/profiles no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/remote/logins no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/services no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/session/{session_id} no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/session/{session_id} plain before the handler's try": { + "body": { + "error_code": "INTERNAL_ERROR", + "message": "Internal server error (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "raised": true + }, + "status": 422 + }, + "GET /api/session/{session_id} unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 GET /api/session/pinned-session service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "GET /api/session/{session_id} wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 GET /api/session/pinned-session service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "GET /api/session/{session_id}/channel no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/session/{session_id}/channel plain before the handler's try": { + "body": { + "error_code": "INTERNAL_ERROR", + "message": "Internal server error (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "raised": true + }, + "status": 422 + }, + "GET /api/session/{session_id}/channel unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 GET /api/session/pinned-session/channel service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "GET /api/session/{session_id}/channel wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 GET /api/session/pinned-session/channel service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "GET /api/session/{session_id}/logs no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/session/{session_id}/logs plain before the handler's try": { + "body": { + "details": { + "operation": "session_logs" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 GET /api/session/pinned-session/logs service=- user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "GET /api/session/{session_id}/logs unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 GET /api/session/pinned-session/logs service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "GET /api/session/{session_id}/logs wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 GET /api/session/pinned-session/logs service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "GET /api/session/{session_id}/prompt no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/session/{session_id}/prompt plain before the handler's try": { + "body": { + "details": { + "operation": "session_prompt_get" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 GET /api/session/pinned-session/prompt service=- user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "GET /api/session/{session_id}/prompt unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 GET /api/session/pinned-session/prompt service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "GET /api/session/{session_id}/prompt wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 GET /api/session/pinned-session/prompt service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "GET /api/session/{session_id}/titles no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/session/{session_id}/titles not authenticated": { + "body": { + "details": { + "auth_status": "authenticating" + }, + "error_code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating) (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 GET /api/session/pinned-session/titles service=EXAMPLE user=test\u2026: Session authentication not complete (status: authenticating)" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating)", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "GET /api/session/{session_id}/titles plain before the handler's try": { + "body": { + "details": { + "operation": "session_titles" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 GET /api/session/pinned-session/titles service=- user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "GET /api/session/{session_id}/titles unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 GET /api/session/pinned-session/titles service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "GET /api/session/{session_id}/titles wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 GET /api/session/pinned-session/titles service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "GET /api/tunnel no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "GET /api/tunnel/check no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/dashboard/drain no key": { + "body": { + "message": "Dashboard key is invalid.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/download no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/download not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/download service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/download not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/download service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/download/jobs/clear-finished no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/download/jobs/{job_id}/input no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/download/jobs/{job_id}/input not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/download/jobs/no-such-job/input service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/download/jobs/{job_id}/input not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/download/jobs/no-such-job/input service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/download/jobs/{job_id}/priority no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/download/jobs/{job_id}/retry no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/list-titles no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/list-titles not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/list-titles service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/list-titles not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/list-titles service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/list-tracks no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/list-tracks not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/list-tracks service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/list-tracks not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/list-tracks service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/maintenance/clear-cache no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/maintenance/clear-temp no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/maintenance/refresh-services no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/remote/logins/{login_id}/input no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/remote/logins/{login_id}/input not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/remote/logins/no-such-login/input service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/remote/logins/{login_id}/input not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/remote/logins/no-such-login/input service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/search no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/search not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/search service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/search not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/search service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/search plain before the handler's try": { + "body": { + "details": { + "operation": "search" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/search service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "POST /api/session/create no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/session/create not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/create service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/create not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/create service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/create plain before the handler's try": { + "body": { + "details": { + "operation": "session_create" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/create service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "POST /api/session/{session_id}/keys/bad no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/session/{session_id}/keys/bad not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/keys/bad service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/keys/bad not authenticated": { + "body": { + "details": { + "auth_status": "authenticating" + }, + "error_code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating) (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/keys/bad service=EXAMPLE user=test\u2026: Session authentication not complete (status: authenticating)" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating)", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/keys/bad not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/keys/bad service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/keys/bad plain before the handler's try": { + "body": { + "error_code": "INTERNAL_ERROR", + "message": "Internal server error (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "raised": true + }, + "status": 422 + }, + "POST /api/session/{session_id}/keys/bad unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 POST /api/session/pinned-session/keys/bad service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "POST /api/session/{session_id}/keys/bad wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 POST /api/session/pinned-session/keys/bad service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "POST /api/session/{session_id}/license no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/session/{session_id}/license not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/license service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/license not authenticated": { + "body": { + "details": { + "auth_status": "authenticating" + }, + "error_code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating) (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/license service=EXAMPLE user=test\u2026: Session authentication not complete (status: authenticating)" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating)", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/license not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/license service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/license plain before the handler's try": { + "body": { + "details": { + "operation": "session_license" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/license service=- user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "POST /api/session/{session_id}/license unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 POST /api/session/pinned-session/license service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "POST /api/session/{session_id}/license wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 POST /api/session/pinned-session/license service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "POST /api/session/{session_id}/prompt no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/session/{session_id}/prompt not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/prompt service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/prompt not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/prompt service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/prompt plain before the handler's try": { + "body": { + "details": { + "operation": "session_prompt_submit" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/prompt service=- user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "POST /api/session/{session_id}/prompt unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 POST /api/session/pinned-session/prompt service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "POST /api/session/{session_id}/prompt wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 POST /api/session/pinned-session/prompt service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "POST /api/session/{session_id}/samples no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/session/{session_id}/samples not authenticated": { + "body": { + "details": { + "auth_status": "authenticating" + }, + "error_code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating) (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/samples service=EXAMPLE user=test\u2026: Session authentication not complete (status: authenticating)" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating)", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/samples plain before the handler's try": { + "body": { + "error_code": "INTERNAL_ERROR", + "message": "Internal server error (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "raised": true + }, + "status": 422 + }, + "POST /api/session/{session_id}/samples unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 POST /api/session/pinned-session/samples service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "POST /api/session/{session_id}/samples wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 POST /api/session/pinned-session/samples service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "POST /api/session/{session_id}/segment_filter no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/session/{session_id}/segment_filter not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/segment_filter service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/segment_filter not authenticated": { + "body": { + "details": { + "auth_status": "authenticating" + }, + "error_code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating) (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/segment_filter service=EXAMPLE user=test\u2026: Session authentication not complete (status: authenticating)" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating)", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/segment_filter not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/segment_filter service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/segment_filter plain before the handler's try": { + "body": { + "details": { + "operation": "session_segment_filter" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/segment_filter service=- user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "POST /api/session/{session_id}/segment_filter unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 POST /api/session/pinned-session/segment_filter service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "POST /api/session/{session_id}/segment_filter wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 POST /api/session/pinned-session/segment_filter service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "POST /api/session/{session_id}/segments no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/session/{session_id}/segments not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/segments service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/segments not authenticated": { + "body": { + "details": { + "auth_status": "authenticating" + }, + "error_code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating) (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/segments service=EXAMPLE user=test\u2026: Session authentication not complete (status: authenticating)" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating)", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/segments not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/segments service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/segments plain before the handler's try": { + "body": { + "details": { + "operation": "session_segments" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/segments service=- user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "POST /api/session/{session_id}/segments unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 POST /api/session/pinned-session/segments service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "POST /api/session/{session_id}/segments wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 POST /api/session/pinned-session/segments service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "POST /api/session/{session_id}/tracks no key": { + "body": { + "message": "Secret Key is Empty.", + "status": 401 + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "error": null, + "late_status": null + }, + "status": 401 + }, + "POST /api/session/{session_id}/tracks not an object": { + "body": { + "error_code": "INVALID_INPUT", + "message": "The request body must be a JSON object (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/tracks service=- user=test\u2026: The request body must be a JSON object" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "The request body must be a JSON object", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/tracks not authenticated": { + "body": { + "details": { + "auth_status": "authenticating" + }, + "error_code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating) (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/tracks service=EXAMPLE user=test\u2026: Session authentication not complete (status: authenticating)" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Session authentication not complete (status: authenticating)", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/tracks not json": { + "body": { + "details": { + "error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" + }, + "error_code": "INVALID_INPUT", + "message": "Invalid JSON request body (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/tracks service=- user=test\u2026: Invalid JSON request body" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Invalid JSON request body", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "POST /api/session/{session_id}/tracks plain before the handler's try": { + "body": { + "details": { + "operation": "session_tracks" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/tracks service=- user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "POST /api/session/{session_id}/tracks unknown session": { + "body": { + "details": { + "session_id": "pinned-session" + }, + "error_code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SESSION_NOT_FOUND 404 POST /api/session/pinned-session/tracks service=- user=test\u2026: Session not found or expired: pinned-session" + ], + "stats": { + "error": { + "code": "SESSION_NOT_FOUND", + "message": "Session not found or expired: pinned-session", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "POST /api/session/{session_id}/tracks wrong owner": { + "body": { + "error_code": "FORBIDDEN", + "message": "Session access denied (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: FORBIDDEN 403 POST /api/session/pinned-session/tracks service=EXAMPLE user=test\u2026: Session access denied" + ], + "stats": { + "error": { + "code": "FORBIDDEN", + "message": "Session access denied", + "ref": "REF" + }, + "late_status": null + }, + "status": 403 + }, + "bad key api": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/keys/bad service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "bad key exit": { + "body": { + "details": { + "reason": "service_exit" + }, + "error_code": "SERVICE_ERROR", + "message": "Service exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "raised": true + }, + "status": 422 + }, + "bad key plain": { + "body": { + "error_code": "INTERNAL_ERROR", + "message": "Internal server error (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "raised": true + }, + "status": 422 + }, + "license batch api": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/license service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "license batch api late": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": true, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/license service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": 422 + }, + "status": 200 + }, + "license batch exit": { + "body": { + "details": { + "reason": "service_exit" + }, + "error_code": "SERVICE_ERROR", + "message": "Service exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/license service=EXAMPLE user=test\u2026: Service exited" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Service exited", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "license batch exit late": { + "body": { + "details": { + "reason": "service_exit" + }, + "error_code": "SERVICE_ERROR", + "message": "Service exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": true, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/license service=EXAMPLE user=test\u2026: Service exited" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Service exited", + "ref": "REF" + }, + "late_status": 422 + }, + "status": 200 + }, + "license batch plain": { + "body": { + "details": { + "operation": "session_license" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/license service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "license batch plain late": { + "body": { + "details": { + "operation": "session_license" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": true, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/license service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": 422 + }, + "status": 200 + }, + "license proxy api": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/license service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "license proxy exit": { + "body": { + "error_code": "SERVICE_ERROR", + "message": "Licence request failed: 1 (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/license service=EXAMPLE user=test\u2026: Licence request failed: 1" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Licence request failed: 1", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "license proxy plain": { + "body": { + "error_code": "SERVICE_ERROR", + "message": "Licence request failed: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/license service=EXAMPLE user=test\u2026: Licence request failed: pinned failure" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Licence request failed: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "license unhashable track": { + "body": { + "details": { + "operation": "session_license" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: unhashable type: 'list' (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/license service=EXAMPLE user=test\u2026: An unexpected error occurred: unhashable type: 'list'" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: unhashable type: 'list'", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "logs api": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 GET /api/session/pinned-session/logs service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "logs exit": { + "body": { + "details": { + "reason": "service_exit" + }, + "error_code": "SERVICE_ERROR", + "message": "Service exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "raised": true + }, + "status": 422 + }, + "logs plain": { + "body": { + "details": { + "operation": "session_logs" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 GET /api/session/pinned-session/logs service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "prompt get api": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 GET /api/session/pinned-session/prompt service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "prompt get exit": { + "body": { + "details": { + "reason": "service_exit" + }, + "error_code": "SERVICE_ERROR", + "message": "Service exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "raised": true + }, + "status": 422 + }, + "prompt get plain": { + "body": { + "details": { + "operation": "session_prompt_get" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 GET /api/session/pinned-session/prompt service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "prompt submit api": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/prompt service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "prompt submit exit": { + "body": { + "details": { + "reason": "service_exit" + }, + "error_code": "SERVICE_ERROR", + "message": "Service exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "raised": true + }, + "status": 422 + }, + "prompt submit plain": { + "body": { + "details": { + "operation": "session_prompt_submit" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/prompt service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "samples api": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/samples service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "samples exit": { + "body": { + "error_code": "SERVICE_ERROR", + "message": "Could not decrypt the samples of this track (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/samples service=EXAMPLE user=test\u2026: Could not decrypt the samples of this track" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Could not decrypt the samples of this track", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "samples plain": { + "body": { + "error_code": "SERVICE_ERROR", + "message": "Could not decrypt the samples of this track (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/samples service=EXAMPLE user=test\u2026: Could not decrypt the samples of this track" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Could not decrypt the samples of this track", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "search api": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/search service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "search exit": { + "body": { + "details": { + "operation": "search", + "reason": "service_exit", + "service": "EXAMPLE" + }, + "error_code": "SERVICE_ERROR", + "message": "Service EXAMPLE exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/search service=EXAMPLE user=test\u2026: Service EXAMPLE exited" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Service EXAMPLE exited", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "search no query": { + "body": { + "error_code": "INVALID_PARAMETERS", + "message": "Missing required 'query' field (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_PARAMETERS 400 POST /api/search service=EXAMPLE user=test\u2026: Missing required 'query' field" + ], + "stats": { + "error": { + "code": "INVALID_PARAMETERS", + "message": "Missing required 'query' field", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "search plain": { + "body": { + "details": { + "operation": "search", + "service": "EXAMPLE" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/search service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "search remote api": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/search service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "search remote exit": { + "body": { + "details": { + "reason": "service_exit" + }, + "error_code": "SERVICE_ERROR", + "message": "Service exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [], + "stats": { + "raised": true + }, + "status": 422 + }, + "search remote plain": { + "body": { + "details": { + "operation": "search" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/search service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "search unknown service": { + "body": { + "details": { + "service": "NOPE" + }, + "error_code": "INVALID_SERVICE", + "message": "Service 'NOPE' not found (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_SERVICE 400 POST /api/search service=- user=test\u2026: Service 'NOPE' not found" + ], + "stats": { + "error": { + "code": "INVALID_SERVICE", + "message": "Service 'NOPE' not found", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "segment filter api": { + "body": { + "error_code": "SERVICE_ERROR", + "message": "Could not run the segment filter for this track (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/segment_filter service=EXAMPLE user=test\u2026: Could not run the segment filter for this track" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Could not run the segment filter for this track", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "segment filter exit": { + "body": { + "error_code": "SERVICE_ERROR", + "message": "Could not run the segment filter for this track (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/segment_filter service=EXAMPLE user=test\u2026: Could not run the segment filter for this track" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Could not run the segment filter for this track", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "segment filter plain": { + "body": { + "error_code": "SERVICE_ERROR", + "message": "Could not run the segment filter for this track (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/segment_filter service=EXAMPLE user=test\u2026: Could not run the segment filter for this track" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Could not run the segment filter for this track", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "segment filter unhashable track": { + "body": { + "details": { + "operation": "session_segment_filter" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: unhashable type: 'list' (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/segment_filter service=EXAMPLE user=test\u2026: An unexpected error occurred: unhashable type: 'list'" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: unhashable type: 'list'", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "segments api": { + "body": { + "details": { + "session_id": "pinned-session", + "track_id": "no-such-track" + }, + "error_code": "TRACK_NOT_FOUND", + "message": "Track not found in session: no-such-track (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: TRACK_NOT_FOUND 404 POST /api/session/pinned-session/segments service=EXAMPLE user=test\u2026: Track not found in session: no-such-track" + ], + "stats": { + "error": { + "code": "TRACK_NOT_FOUND", + "message": "Track not found in session: no-such-track", + "ref": "REF" + }, + "late_status": null + }, + "status": 404 + }, + "segments exit": { + "body": { + "details": { + "operation": "session_segments", + "reason": "service_exit", + "session_id": "pinned-session" + }, + "error_code": "SERVICE_ERROR", + "message": "Service exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/segments service=EXAMPLE user=test\u2026: Service exited" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Service exited", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "segments plain": { + "body": { + "details": { + "operation": "session_segments", + "session_id": "pinned-session" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/segments service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "services plain": { + "body": { + "details": { + "operation": "list_services" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 GET /api/services service=- user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "session create api": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/create service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "session create exit": { + "body": { + "details": { + "operation": "session_create", + "reason": "service_exit", + "service": "EXAMPLE", + "title_id": "title-0001" + }, + "error_code": "SERVICE_ERROR", + "message": "Service EXAMPLE exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/create service=EXAMPLE user=test\u2026: Service EXAMPLE exited" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Service EXAMPLE exited", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "session create no title": { + "body": { + "error_code": "INVALID_INPUT", + "message": "Missing required parameter: title_id (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_INPUT 400 POST /api/session/create service=EXAMPLE user=test\u2026: Missing required parameter: title_id" + ], + "stats": { + "error": { + "code": "INVALID_INPUT", + "message": "Missing required parameter: title_id", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "session create plain": { + "body": { + "details": { + "operation": "session_create", + "service": "EXAMPLE", + "title_id": "title-0001" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/create service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "session create proxy failed": { + "body": { + "details": { + "operation": "session_create", + "service": "EXAMPLE", + "title_id": "title-0001" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/create service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "session create proxy refused": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/create service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "session create unknown service": { + "body": { + "details": { + "service": "NOPE" + }, + "error_code": "INVALID_SERVICE", + "message": "Invalid or unavailable service: NOPE (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INVALID_SERVICE 400 POST /api/session/create service=- user=test\u2026: Invalid or unavailable service: NOPE" + ], + "stats": { + "error": { + "code": "INVALID_SERVICE", + "message": "Invalid or unavailable service: NOPE", + "ref": "REF" + }, + "late_status": null + }, + "status": 400 + }, + "titles api": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 GET /api/session/pinned-session/titles service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "titles api late": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": true, + "log": [ + "Error ref REF: SERVICE_ERROR 422 GET /api/session/pinned-session/titles service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": 422 + }, + "status": 200 + }, + "titles exit": { + "body": { + "details": { + "operation": "session_titles", + "reason": "service_exit", + "session_id": "pinned-session" + }, + "error_code": "SERVICE_ERROR", + "message": "Service exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 GET /api/session/pinned-session/titles service=EXAMPLE user=test\u2026: Service exited" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Service exited", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "titles exit late": { + "body": { + "details": { + "operation": "session_titles", + "reason": "service_exit", + "session_id": "pinned-session" + }, + "error_code": "SERVICE_ERROR", + "message": "Service exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": true, + "log": [ + "Error ref REF: SERVICE_ERROR 422 GET /api/session/pinned-session/titles service=EXAMPLE user=test\u2026: Service exited" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Service exited", + "ref": "REF" + }, + "late_status": 422 + }, + "status": 200 + }, + "titles plain": { + "body": { + "details": { + "operation": "session_titles", + "session_id": "pinned-session" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 GET /api/session/pinned-session/titles service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "titles plain late": { + "body": { + "details": { + "operation": "session_titles", + "session_id": "pinned-session" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": true, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 GET /api/session/pinned-session/titles service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": 422 + }, + "status": 200 + }, + "tracks api": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/tracks service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "tracks api late": { + "body": { + "details": { + "pinned": true + }, + "error_code": "SERVICE_ERROR", + "message": "pinned refusal (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": true, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/tracks service=EXAMPLE user=test\u2026: pinned refusal" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "pinned refusal", + "ref": "REF" + }, + "late_status": 422 + }, + "status": 200 + }, + "tracks exit": { + "body": { + "details": { + "operation": "session_tracks", + "reason": "service_exit", + "session_id": "pinned-session", + "title_id": "title-0001" + }, + "error_code": "SERVICE_ERROR", + "message": "Service exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/tracks service=EXAMPLE user=test\u2026: Service exited" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Service exited", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "tracks exit late": { + "body": { + "details": { + "operation": "session_tracks", + "reason": "service_exit", + "session_id": "pinned-session", + "title_id": "title-0001" + }, + "error_code": "SERVICE_ERROR", + "message": "Service exited (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": true, + "log": [ + "Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/tracks service=EXAMPLE user=test\u2026: Service exited" + ], + "stats": { + "error": { + "code": "SERVICE_ERROR", + "message": "Service exited", + "ref": "REF" + }, + "late_status": 422 + }, + "status": 200 + }, + "tracks plain": { + "body": { + "details": { + "operation": "session_tracks", + "session_id": "pinned-session", + "title_id": "title-0001" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": false, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/tracks service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": null + }, + "status": 422 + }, + "tracks plain late": { + "body": { + "details": { + "operation": "session_tracks", + "session_id": "pinned-session", + "title_id": "title-0001" + }, + "error_code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure (ref REF)", + "ref": "REF", + "status": "error", + "timestamp": "TIMESTAMP" + }, + "content_type": "application/json", + "leading_newlines": true, + "log": [ + "Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/tracks service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure" + ], + "stats": { + "error": { + "code": "INTERNAL_ERROR", + "message": "An unexpected error occurred: pinned failure", + "ref": "REF" + }, + "late_status": 422 + }, + "status": 200 + } +} diff --git a/tests/remote/unit/test_route_error_replies.py b/tests/remote/unit/test_route_error_replies.py new file mode 100644 index 00000000..bb58c408 --- /dev/null +++ b/tests/remote/unit/test_route_error_replies.py @@ -0,0 +1,365 @@ +"""Pin the error replies of the API routes, so a change to the error layers changes no wire byte. + +Each case sends one request through the middleware chain of an API-only serve. The snapshot keeps the status, +the body, the state the stats middleware reads and the ``Error ref`` log line, with the random ref and the +timestamp masked. A late case holds the service until the client has the heartbeat headers. To accept a +deliberate change, delete the snapshot file and run the test two times. +""" + +from __future__ import annotations + +import json +import threading +from collections import Counter, defaultdict +from dataclasses import dataclass, field +from pathlib import Path +from types import SimpleNamespace +from typing import Any, NoReturn, Optional + +import pytest +from aiohttp import web + +from unshackle.core.api import handlers, routes +from unshackle.core.api.compression import compression_middleware +from unshackle.core.api.errors import APIError +from unshackle.core.api.handlers import api_key_authentication, dashboard_authentication +from unshackle.core.api.routes import DASHBOARD_ROUTES, ROUTES, cors_middleware, no_5xx_middleware, setup_routes +from unshackle.core.api.session_store import get_session_store +from unshackle.core.api.stats import stats, stats_middleware +from unshackle.core.config import config +from unshackle.core.remote_protocol import ( + BAD_KEY_ROUTE, + LICENSE_ROUTE, + LOGS_ROUTE, + PROMPT_ROUTE, + SAMPLES_ROUTE, + SEARCH_ROUTE, + SEGMENT_FILTER_ROUTE, + SEGMENTS_ROUTE, + SESSION_CREATE_ROUTE, + TITLES_ROUTE, + TRACKS_ROUTE, + APIErrorCode, + AuthStatus, +) +from unshackle.core.titles.movie import Movie + +pytestmark = [pytest.mark.unit, pytest.mark.usefixtures("example_service")] + +SNAPSHOTS = Path(__file__).parent / "snapshots" +KEY = "test-key" +OTHER_KEY = "other-key" +DASHBOARD_KEY = "dash-key" +SESSION = "pinned-session" +RELEASE = threading.Event() + +SEEN: list[dict[str, Any]] = [] + + +def raise_fault(kind: Optional[str]) -> NoReturn: + if kind == "api": + raise APIError(APIErrorCode.SERVICE_ERROR, "pinned refusal", details={"pinned": True}) + if kind == "exit": + raise SystemExit(1) + raise RuntimeError("pinned failure") + + +class Faulty: + """A stand-in whose methods all raise the fault *kind*; a *late* one first waits for RELEASE.""" + + def __init__(self, kind: Optional[str] = None, late: bool = False, **attrs: Any) -> None: + self.kind = kind + self.late = late + self.session = SimpleNamespace(headers={}, cookies=[], get=self.fail) + self.__dict__.update(attrs) + + def fail(self, *args: Any, **kwargs: Any) -> NoReturn: + if self.late: + RELEASE.wait(5) + raise_fault(self.kind) + + get_titles = get_tracks = get_chapters = get_widevine_license = decrypts_samples = fail + get_pending_cdm_call = submit_response = since = fail + last_seq = 0 + + def cancel(self) -> None: + """End of the session: nothing to unblock.""" + + +@web.middleware +async def recorder(request: web.Request, handler: Any) -> web.StreamResponse: + """Keep the state that the stats middleware reads from the response.""" + try: + response = await handler(request) + except BaseException: + SEEN.append({"raised": True}) + raise + SEEN.append({"error": response.get("error"), "late_status": response.get("late_status")}) + return response + + +def fill(route: str) -> str: + return route.format(session_id=SESSION, job_id="no-such-job", login_id="no-such-login") + + +BODIES: dict[str, Any] = { + SEARCH_ROUTE: {"service": "EXAMPLE", "query": "film"}, + SESSION_CREATE_ROUTE: {"service": "EXAMPLE", "title_id": "title-0001"}, + TRACKS_ROUTE: {"title_id": "title-0001"}, + SEGMENTS_ROUTE: {"track_ids": ["v1"]}, + SEGMENT_FILTER_ROUTE: {"track_id": "v1"}, + LICENSE_ROUTE: {"track_id": "v1", "challenge": "AAAA"}, + BAD_KEY_ROUTE: {"kid": "00" * 16, "key": "11" * 16}, + PROMPT_ROUTE: {"response": "1234"}, + "/api/list-titles": {"service": "EXAMPLE", "title_id": "title-0001"}, + "/api/list-tracks": {"service": "EXAMPLE", "title_id": "title-0001"}, + "/api/download": {"service": "EXAMPLE", "title_id": "title-0001"}, + "/api/download/jobs/{job_id}/input": {"response": "1234"}, + "/api/remote/logins/{login_id}/input": {"response": "1234"}, +} +AUTHENTICATED_ROUTES = [TITLES_ROUTE, TRACKS_ROUTE, SEGMENTS_ROUTE, SEGMENT_FILTER_ROUTE, LICENSE_ROUTE, BAD_KEY_ROUTE] +SAMPLES = fill(SAMPLES_ROUTE) + "?track_id=v1&entry=1" + + +@dataclass +class Case: + """One request, with the remote session it needs and the module attributes it patches.""" + + method: str + path: str + body: Any = None + session: Optional[Faulty] = None + owner: str = KEY + status: AuthStatus = AuthStatus.AUTHENTICATED + patch: dict[str, Any] = field(default_factory=dict) + key: Optional[str] = KEY + + +def generic_cases() -> dict[str, Case]: + """A missing key on every route, a bad body on every JSON route, and the session checks on every session route.""" + cases: dict[str, Case] = {} + for method, route, _, _ in ROUTES + DASHBOARD_ROUTES: + path = fill(route) + cases[f"{method} {route} no key"] = Case(method, path, key=None) + if method == "POST" and route in BODIES: + cases[f"{method} {route} not json"] = Case(method, path, "{not json") + cases[f"{method} {route} not an object"] = Case(method, path, "[1]") + if "{session_id}" in route and not route.startswith(handlers.DASHBOARD_PREFIX): + if route == SAMPLES_ROUTE: + path = SAMPLES + body = BODIES.get(route) if method == "POST" else None + cases[f"{method} {route} unknown session"] = Case(method, path, body) + cases[f"{method} {route} wrong owner"] = Case(method, path, body, session=Faulty(), owner=OTHER_KEY) + cases[f"{method} {route} plain before the handler's try"] = Case( + method, path, body, patch={"get_validated_session": Faulty().fail} + ) + if route in AUTHENTICATED_ROUTES + [SAMPLES_ROUTE]: + cases[f"{method} {route} not authenticated"] = Case( + method, path, body, session=Faulty(), status=AuthStatus.AUTHENTICATING + ) + return cases + + +def fault_cases() -> dict[str, Case]: + """Each fault inside the handler of a remote session route, of search and of session create.""" + cases: dict[str, Case] = {} + batch = {"mode": "server_cdm", "track_ids": ["v1"]} + for kind in ("api", "plain", "exit"): + for late in (False, True): + when = " late" if late else "" + heartbeat = {"routes.HEARTBEAT_INTERVAL": 0.01} if late else {} + cases[f"titles {kind}{when}"] = Case("GET", fill(TITLES_ROUTE), session=Faulty(kind, late), patch=heartbeat) + cases[f"tracks {kind}{when}"] = Case( + "POST", fill(TRACKS_ROUTE), BODIES[TRACKS_ROUTE], session=Faulty(kind, late), patch=heartbeat + ) + cases[f"license batch {kind}{when}"] = Case( + "POST", + fill(LICENSE_ROUTE), + batch, + session=Faulty(), + patch={"fetch_init_segment": Faulty(kind, late).fail, **heartbeat}, + ) + cases[f"license proxy {kind}"] = Case("POST", fill(LICENSE_ROUTE), BODIES[LICENSE_ROUTE], session=Faulty(kind)) + cases[f"segments {kind}"] = Case( + "POST", + fill(SEGMENTS_ROUTE), + {"track_ids": ["no-such-track"]} if kind == "api" else BODIES[SEGMENTS_ROUTE], + session=Faulty(), + patch={} if kind == "api" else {"client_session_auth": Faulty(kind).fail}, + ) + cases[f"segment filter {kind}"] = Case( + "POST", fill(SEGMENT_FILTER_ROUTE), BODIES[SEGMENT_FILTER_ROUTE], session=Faulty(kind) + ) + cases[f"samples {kind}"] = Case("POST", SAMPLES, session=Faulty(kind)) + cases[f"bad key {kind}"] = Case( + "POST", + fill(BAD_KEY_ROUTE), + BODIES[BAD_KEY_ROUTE], + session=Faulty(), + patch={"load_server_vaults": Faulty(kind).fail}, + ) + cases[f"prompt get {kind}"] = Case("GET", fill(PROMPT_ROUTE), session=Faulty(input_bridge=Faulty(kind))) + cases[f"prompt submit {kind}"] = Case( + "POST", + fill(PROMPT_ROUTE), + BODIES[PROMPT_ROUTE], + session=Faulty(input_bridge=Faulty(kind, status=AuthStatus.PENDING_INPUT)), + ) + cases[f"logs {kind}"] = Case("GET", fill(LOGS_ROUTE), session=Faulty(log_buffer=Faulty(kind))) + cases[f"search {kind}"] = Case( + "POST", SEARCH_ROUTE, BODIES[SEARCH_ROUTE], patch={"run_service_search": Faulty(kind).fail} + ) + cases[f"search remote {kind}"] = Case( + "POST", + SEARCH_ROUTE, + {**BODIES[SEARCH_ROUTE], "remote": "elsewhere"}, + patch={"remote_server": Faulty(kind).fail}, + ) + cases[f"session create {kind}"] = Case( + "POST", + SESSION_CREATE_ROUTE, + BODIES[SESSION_CREATE_ROUTE], + patch={"resolve_handler_proxy": lambda *args: (None, None), "create_service_instance": Faulty(kind).fail}, + ) + cases["license unhashable track"] = Case( + "POST", fill(LICENSE_ROUTE), {"track_id": ["v1"], "challenge": "AAAA"}, session=Faulty() + ) + cases["segment filter unhashable track"] = Case( + "POST", fill(SEGMENT_FILTER_ROUTE), {"track_id": ["v1"]}, session=Faulty() + ) + for route in (SEARCH_ROUTE, SESSION_CREATE_ROUTE): + cases[f"POST {route} plain before the handler's try"] = Case( + "POST", route, BODIES[route], patch={"validate_service": Faulty().fail} + ) + cases["services plain"] = Case("GET", "/api/services", patch={"routes.service_catalogue": Faulty().fail}) + cases["search unknown service"] = Case("POST", SEARCH_ROUTE, {"service": "NOPE", "query": "film"}) + cases["search no query"] = Case("POST", SEARCH_ROUTE, {"service": "EXAMPLE"}) + cases["session create unknown service"] = Case( + "POST", SESSION_CREATE_ROUTE, {"service": "NOPE", "title_id": "title-0001"} + ) + cases["session create no title"] = Case("POST", SESSION_CREATE_ROUTE, {"service": "EXAMPLE"}) + cases["session create proxy refused"] = Case( + "POST", SESSION_CREATE_ROUTE, BODIES[SESSION_CREATE_ROUTE], patch={"resolve_handler_proxy": Faulty("api").fail} + ) + cases["session create proxy failed"] = Case( + "POST", SESSION_CREATE_ROUTE, BODIES[SESSION_CREATE_ROUTE], patch={"resolve_handler_proxy": Faulty().fail} + ) + return cases + + +async def open_session(stand_in: Faulty, owner: str, status: AuthStatus) -> None: + session = await get_session_store().create("EXAMPLE", stand_in, session_id=SESSION, owner_key=owner) + session.auth_status = status + session.title_map["title-0001"] = Movie(id_="title-0001", service=object, name="Film", year=2024, language=None) + track = SimpleNamespace( + id="v1", + descriptor=SimpleNamespace(name="HLS"), + url="https://example.invalid/v1.m3u8", + drm=None, + data={}, + OnSegmentFilter=lambda segment: False, + ) + session.tracks["v1"] = track # type: ignore[assignment] + session.tracks_by_title["title-0001"] = {"v1": track} # type: ignore[dict-item] + session.served_keys["00" * 16] = ("11" * 16, "pinned-vault") + session.input_bridge = getattr(stand_in, "input_bridge", None) + session.log_buffer = getattr(stand_in, "log_buffer", None) + + +def masked(value: Any, ref: Optional[str]) -> Any: + """*value* with the error ref and the timestamp replaced, at any depth. + + The longer Python 3.14 text of an unhashable key error reads as the 3.11 text. + """ + if isinstance(value, dict): + return {k: "TIMESTAMP" if k == "timestamp" else masked(v, ref) for k, v in value.items()} + if isinstance(value, list): + return [masked(v, ref) for v in value] + if isinstance(value, str): + value = value.replace("cannot use 'list' as a dict key (unhashable type: 'list')", "unhashable type: 'list'") + return value.replace(ref, "REF") if ref else value + return value + + +async def send(client: Any, item: Case, caplog: pytest.LogCaptureFixture) -> dict[str, Any]: + """The masked reply to *item*.""" + SEEN.clear() + caplog.clear() + body = item.body + data = body if isinstance(body, str) or body is None else json.dumps(body) + headers = {"X-Secret-Key": item.key} if item.key else {} + RELEASE.clear() + resp = await client.request(item.method, item.path, data=data, headers=headers) + RELEASE.set() + text = await resp.text() + try: + reply: Any = json.loads(text) + except ValueError: + reply = text + seen = SEEN[0] if SEEN else None + error = (seen or {}).get("error") or {} + ref = error.get("ref") or (reply.get("ref") if isinstance(reply, dict) else None) + log_lines = [r.getMessage() for r in caplog.records if r.getMessage().startswith("Error ref ")] + return masked( + { + "status": resp.status, + "content_type": resp.content_type, + "leading_newlines": len(text) - len(text.lstrip("\n")) > 0, + "body": reply, + "stats": seen, + "log": log_lines, + }, + ref, + ) + + +def matches_snapshot(name: str, text: str) -> None: + path = SNAPSHOTS / name + if not path.exists(): + path.parent.mkdir(exist_ok=True) + path.write_text(text, encoding="utf-8") + pytest.fail(f"Wrote the missing snapshot {path.name}: run the test again") + assert text == path.read_text(encoding="utf-8") + + +@pytest.fixture +def app(monkeypatch: pytest.MonkeyPatch) -> web.Application: + monkeypatch.setitem(config.serve, "users", {KEY: {"server_cdm": True}, OTHER_KEY: {}}) + monkeypatch.setitem(config.serve, "dashboard", {"key": DASHBOARD_KEY}) + monkeypatch.setattr(stats, "keys", {}) + monkeypatch.setattr(stats, "errors", defaultdict(Counter)) + app = web.Application( + middlewares=[ + cors_middleware, + no_5xx_middleware, + recorder, + stats_middleware, + dashboard_authentication, + api_key_authentication, + compression_middleware, + ] + ) + app["config"] = {"users": {KEY: {}, OTHER_KEY: {}}} + app["debug_api"] = False + setup_routes(app, dashboard=True) + return app + + +async def test_error_replies_match_the_snapshot( + app: web.Application, aiohttp_client: Any, caplog: pytest.LogCaptureFixture +) -> None: + client = await aiohttp_client(app) + store = get_session_store() + replies = {} + for name, item in sorted({**generic_cases(), **fault_cases()}.items()): + with pytest.MonkeyPatch.context() as mp: + for target, value in item.patch.items(): + module, _, attr = target.rpartition(".") + mp.setattr(routes if module == "routes" else handlers, attr, value) + if item.session is not None: + await open_session(item.session, item.owner, item.status) + try: + replies[name] = await send(client, item, caplog) + finally: + await store.delete(SESSION) + matches_snapshot("route_error_replies.json", json.dumps(replies, indent=1, sort_keys=True) + "\n") diff --git a/unshackle/core/api/routes.py b/unshackle/core/api/routes.py index 5af4df99..67a2e11c 100644 --- a/unshackle/core/api/routes.py +++ b/unshackle/core/api/routes.py @@ -159,6 +159,26 @@ def api_handler(handler: Handler) -> Handler: return wrapper +def categorized(handler: Handler) -> Handler: + """Answer an exception that is not an APIError as its category, with the route name as the operation.""" + operation = handler.__name__ + label = f"Error in {operation.replace('_', ' ')}" + + @functools.wraps(handler) + async def wrapper(request: web.Request) -> web.StreamResponse: + try: + return await handler(request) + except APIError: + raise + except Exception as e: + log.exception(label) + return handle_api_exception( + e, context={"operation": operation}, debug_mode=request.app.get("debug_api", False) + ) + + return wrapper + + async def json_body(request: web.Request) -> Any: """The request's JSON object; raises INVALID_INPUT when it does not parse or is not an object.""" try: @@ -571,6 +591,7 @@ async def services(request: web.Request) -> web.Response: @api_handler +@categorized async def search(request: web.Request) -> web.Response: """ Find titles from a service. @@ -668,13 +689,7 @@ async def search(request: web.Request) -> web.Response: description: Invalid request """ data = await json_body(request) - - try: - return await search_handler(data, request) - except Exception as e: - log.exception("Error in search") - debug_mode = request.app.get("debug_api", False) - return handle_api_exception(e, context={"operation": "search"}, debug_mode=debug_mode) + return await search_handler(data, request) @api_handler @@ -1925,6 +1940,7 @@ async def env_check(request: web.Request) -> web.Response: @api_handler +@categorized async def session_create(request: web.Request) -> web.Response: """ Make a remote session. @@ -2097,13 +2113,7 @@ async def session_create(request: web.Request) -> web.Response: description: Authentication failed """ data = await json_body(request) - try: - return await session_create_handler(data, request) - except Exception as e: - log.exception("Error in session create") - return handle_api_exception( - e, context={"operation": "session_create"}, debug_mode=request.app.get("debug_api", False) - ) + return await session_create_handler(data, request) @api_handler @@ -2163,6 +2173,7 @@ async def tunnel_check(request: web.Request) -> web.Response: @api_handler @heartbeat +@categorized async def session_titles(request: web.Request) -> web.Response: """ Get titles for an authenticated remote session. @@ -2185,17 +2196,12 @@ async def session_titles(request: web.Request) -> web.Response: description: Remote session not found """ session_id = request.match_info["session_id"] - try: - return await session_titles_handler(session_id, request) - except Exception as e: - log.exception("Error in session titles") - return handle_api_exception( - e, context={"operation": "session_titles"}, debug_mode=request.app.get("debug_api", False) - ) + return await session_titles_handler(session_id, request) @api_handler @heartbeat +@categorized async def session_tracks(request: web.Request) -> web.Response: """ Get tracks and chapters for a specific title. @@ -2231,16 +2237,11 @@ async def session_tracks(request: web.Request) -> web.Response: """ session_id = request.match_info["session_id"] data = await json_body(request) - try: - return await session_tracks_handler(data, session_id, request) - except Exception as e: - log.exception("Error in session tracks") - return handle_api_exception( - e, context={"operation": "session_tracks"}, debug_mode=request.app.get("debug_api", False) - ) + return await session_tracks_handler(data, session_id, request) @api_handler +@categorized async def session_segments(request: web.Request) -> web.Response: """ Get segment URLs for selected tracks. @@ -2275,16 +2276,11 @@ async def session_segments(request: web.Request) -> web.Response: """ session_id = request.match_info["session_id"] data = await json_body(request) - try: - return await session_segments_handler(data, session_id, request) - except Exception as e: - log.exception("Error in session segments") - return handle_api_exception( - e, context={"operation": "session_segments"}, debug_mode=request.app.get("debug_api", False) - ) + return await session_segments_handler(data, session_id, request) @api_handler +@categorized async def session_segment_filter(request: web.Request) -> web.Response: """ Get the unwanted HLS segments for one track. @@ -2320,13 +2316,7 @@ async def session_segment_filter(request: web.Request) -> web.Response: """ session_id = request.match_info["session_id"] data = await json_body(request) - try: - return await session_segment_filter_handler(data, session_id, request) - except Exception as e: - log.exception("Error in session segment filter") - return handle_api_exception( - e, context={"operation": "session_segment_filter"}, debug_mode=request.app.get("debug_api", False) - ) + return await session_segment_filter_handler(data, session_id, request) @api_handler @@ -2379,6 +2369,7 @@ async def session_samples(request: web.Request) -> web.Response: @api_handler @heartbeat +@categorized async def session_license(request: web.Request) -> web.Response: """ Proxy DRM license through authenticated service. @@ -2436,16 +2427,7 @@ async def session_license(request: web.Request) -> web.Response: """ session_id = request.match_info["session_id"] data = await json_body(request) - try: - return await session_license_handler(data, session_id, request) - except Exception as e: - if isinstance(e, APIError) and e.error_code is APIErrorCode.SERVER_CDM_CAPPED: - log.info(f"Session licence refused: {e.message}") - else: - log.exception("Error in session license") - return handle_api_exception( - e, context={"operation": "session_license"}, debug_mode=request.app.get("debug_api", False) - ) + return await session_license_handler(data, session_id, request) @api_handler @@ -2578,6 +2560,7 @@ async def session_channel(request: web.Request) -> web.StreamResponse: @api_handler +@categorized async def session_prompt_get(request: web.Request) -> web.Response: """ Poll for pending interactive prompts during authentication. @@ -2619,16 +2602,11 @@ async def session_prompt_get(request: web.Request) -> web.Response: description: Remote session not found """ session_id = request.match_info["session_id"] - try: - return await session_prompt_get_handler(session_id, request) - except Exception as e: - log.exception("Error in session prompt get") - return handle_api_exception( - e, context={"operation": "session_prompt_get"}, debug_mode=request.app.get("debug_api", False) - ) + return await session_prompt_get_handler(session_id, request) @api_handler +@categorized async def session_logs(request: web.Request) -> web.Response: """ Drain the remote session's service log records. @@ -2679,16 +2657,11 @@ async def session_logs(request: web.Request) -> web.Response: since = int(request.query.get("since", 0)) except ValueError: since = 0 - try: - return await session_logs_handler(session_id, since, request) - except Exception as e: - log.exception("Error in session logs") - return handle_api_exception( - e, context={"operation": "session_logs"}, debug_mode=request.app.get("debug_api", False) - ) + return await session_logs_handler(session_id, since, request) @api_handler +@categorized async def session_prompt_submit(request: web.Request) -> web.Response: """ Submit a response to a pending interactive prompt. @@ -2731,13 +2704,7 @@ async def session_prompt_submit(request: web.Request) -> web.Response: """ session_id = request.match_info["session_id"] data = await json_body(request) - try: - return await session_prompt_post_handler(data, session_id, request) - except Exception as e: - log.exception("Error in session prompt submit") - return handle_api_exception( - e, context={"operation": "session_prompt_submit"}, debug_mode=request.app.get("debug_api", False) - ) + return await session_prompt_post_handler(data, session_id, request) @api_handler