Skip to content

Commit

Permalink
fix: improve description for error status
Browse files Browse the repository at this point in the history
  • Loading branch information
minsiyang committed Nov 20, 2024
1 parent d52eaf9 commit 87b5d92
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions components/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,9 @@ responses:


"400":
description: "Bad Request: A parameter provided as a part of the request was invalid."
description: >-
Bad Request: one or more parameters are invalid. Check the input to match the expected format.
See [Snyk API](https://docs.snyk.io/snyk-api)
headers:
snyk-version-requested:
{ $ref: "#/headers/VersionRequestedResponseHeader" }
Expand All @@ -471,7 +473,9 @@ responses:
schema: { $ref: "#/schemas/ErrorDocument" }

"401":
description: "Unauthorized: the request requires an authentication token."
description: >-
Unauthorized: the request requires an authentication token.
See [Revoke and regenerate a Snyk API token](https://docs.snyk.io/snyk-api/rest-api/authentication-for-api/revoke-and-regenerate-a-snyk-api-token).
headers:
snyk-version-requested:
{ $ref: "#/headers/VersionRequestedResponseHeader" }
Expand All @@ -486,7 +490,10 @@ responses:
schema: { $ref: "#/schemas/ErrorDocument" }

"403":
description: "Forbidden: the request requires an authentication token with more or different permissions."
description: >-
Forbidden: the request requires an authentication token with more or different permissions.
Review token permissions and try again.
See [PAT permissions](https://support.snyk.io/hc/en-us/articles/4410967220765-How-to-check-if-a-personal-access-token-has-the-correct-permissions).
headers:
snyk-version-requested:
{ $ref: "#/headers/VersionRequestedResponseHeader" }
Expand All @@ -501,7 +508,8 @@ responses:
schema: { $ref: "#/schemas/ErrorDocument" }

"404":
description: "Not Found: The resource being operated on could not be found."
description: >-
Not Found: The resource you are trying to access could not be found. Review the request and try again.
headers:
snyk-version-requested:
{ $ref: "#/headers/VersionRequestedResponseHeader" }
Expand Down Expand Up @@ -561,7 +569,9 @@ responses:
schema: { $ref: "#/schemas/ErrorDocument" }

"500":
description: "Internal Server Error: An error was encountered while attempting to process the request."
description: >-
Internal Server Error: An unexpected error was encountered while attempting to process the request.
Try again. If the error still occurs, contact support.
headers:
snyk-version-requested:
{ $ref: "#/headers/VersionRequestedResponseHeader" }
Expand Down

0 comments on commit 87b5d92

Please sign in to comment.