Error Codes

HTTP status codes, error response format, and URL validation rules for the Oathe API.

Error Response Format

All error responses return a JSON object with three fields:

{
  "statusCode": 400,
  "name": "validation_error",
  "message": "Invalid repository URL format."
}
statusCode number
HTTP status code (matches the response status).
name string
Machine-readable error code for programmatic handling.
message string
Human-readable description of the error.

Status Codes

CodeMeaningWhen It Occurs
200OKSuccessful GET request.
201CreatedAudit successfully submitted via POST.
400Bad RequestInvalid input — malformed URL, missing fields, or unsupported format.
404Not FoundAudit ID does not exist, or no audit found for the given skill.
405Method Not AllowedWrong HTTP method for the endpoint.
409ConflictResource state conflict (e.g., audit already complete).
422Unprocessable EntityIdempotency key body mismatch. See Idempotency.
429Rate LimitedSubmission rate limit exceeded. See Rate Limits.
500Server ErrorInternal failure. Retry after a short delay. If persistent, report the issue.

URL Validation Rules

The skill_url field submitted to POST /api/submit must satisfy the following rules:

Accepted Formats

https://github.com/{owner}/{repo}
https://github.com/{owner}/{repo}/tree/{branch}/{path}
  • The URL must use the https scheme.
  • The host must be github.com.
  • {owner} and {repo} must contain only alphanumeric characters, hyphens, underscores, and periods.
  • /tree/ paths are used for monorepo subdirectory audits. The branch and path segments are required when /tree/ is present.

Restricted Characters

The following are rejected in the owner, repo, branch, or path segments:

  • Spaces and whitespace characters.
  • Query strings (?) and fragments (#).
  • Encoded traversal sequences (.., %2e%2e).
  • Null bytes and control characters.

Invalid Examples

URLReason
http://github.com/owner/repoHTTP not accepted; must be HTTPS.
https://gitlab.com/owner/repoOnly GitHub URLs are supported.
https://github.com/owner/repo/tree/Missing branch and path after /tree/.
https://github.com/owner/../repoPath traversal not allowed.
https://github.com/owner/repo?ref=mainQuery strings not accepted.

Common Errors

nameStatusMessage
validation_error400Invalid repository URL format.
validation_error400Missing required field: skill_url.
audit_not_found404Audit not found.
skill_not_found404No audit found for this skill.
method_not_allowed405HTTP method not allowed.
conflict409Audit already complete.
idempotency_mismatch422Request body does not match the original request for this idempotency key.
rate_limited429Rate limited. Please wait before retrying.
internal_error500Internal server error.

Debugging Tips

  • Double-check URL formatting before submitting. Copy the URL directly from the GitHub repository page to avoid typos.
  • If you receive a 404 on a summary endpoint, the skill may not have been audited yet. Submit it via POST /api/submit first.
  • For 500 errors, include the audit_id (if available) when reporting the issue so the team can trace the failure.