Skip to content

Commit f4a6027

Browse files
Document the error responses in a table
1 parent 366d69b commit f4a6027

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

docs/specs/account-management-api.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ Response
8888
- `token`: You store this token. You need to supply it after the end-user returns to your app.
8989
- `authorization_url`: You MUST redirect the end-user to this URL to continue the authorization code flow. If `exclude_state_in_authorization_url` is false, it has `state` parameter included.
9090

91+
Error response
92+
93+
|Description|Name|Reason|Info|
94+
|---|---|---|---|
95+
|If the request is not authenticated|Unauthorized|Unauthorized||
96+
9197
The OAuth provider ultimately will call your redirect URI with query parameters added. You continue the flow with [Finish adding an OAuth provider account, with authorization code flow](#finish-adding-an-oauth-provider-account-with-authorization-code-flow).
9298

9399
Here is some pseudo code that you should do
@@ -153,6 +159,7 @@ Error response
153159

154160
|Description|Name|Reason|Info|
155161
|---|---|---|---|
162+
|If the request is not authenticated|Unauthorized|Unauthorized||
156163
|If the OAuth provider account is already taken by another account|Invalid|InvariantViolated|`{"cause": { "kind": "DuplicatedIdentity" } }`|
157164
|If `token` is invalid|Invalid|AccountManagementOAuthTokenInvalid||
158165
|If `exclude_state_in_authorization_url` is false, and `state` in `query` is not equal to the one bound to `token`|Invalid|AccountManagementOAuthStateNotBoundToToken||

0 commit comments

Comments
 (0)