Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify error response format per #317 #368

Merged
merged 2 commits into from Oct 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,30 @@ Response bodies must be a `UTF-8` encoded JSON object and must minimally include
}
```

#### HTTP Response Codes

* **200:** OK: operation successful.
* **400:** Bad request.
* **401:** Unauthorized: Invalid, expired, or insufficient scope of token.
* **404:** Not Found: Object(s) do not exist.
* **500:** Internal server error.

#### Error Format

```json
{
"error": "...",
"error_description": "...",
"error_details": [ "...", "..." ]
}
```

| Field | Type | Field Description |
| ------------------- | -------- | ---------------------- |
| `error` | String | Error message string |
| `error_description` | String | Human readable error description (can be localized) |
| `error_details` | String[] (optional) | Array of error details |

All response fields must use `lower_case_with_underscores`.

#### JSON Schema
Expand Down