Skip to content

Commit

Permalink
exceptions_alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroDiez committed Oct 19, 2024
1 parent 1af9b16 commit 73a5ddc
Showing 1 changed file with 84 additions and 45 deletions.
129 changes: 84 additions & 45 deletions code/API_definitions/blockchain-public-address.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -344,22 +344,26 @@ components:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
InvalidArgument:
GENERIC_400_INVALID_ARGUMENT:
description: Invalid Argument. Generic Syntax Exception
value:
status: 400
code: INVALID_ARGUMENT
message: Client specified an invalid argument, request body or query param
InvalidBlockchainNetworkId:
message: Client specified an invalid argument, request body or query param.
GENERIC_400_INVALID_BLOCKCHAIN_NETWORK_ID:
description: blockchainNetworkId is not valid
value:
status: 400
code: BLOCKCHAIN_PUBLIC_ADDRESS.INVALID_BLOCKCHAIN_NETWORK_IDENTIFIER
message: Indicated blockchainNetworkId is not valid
InvalidCurrencyForBlockchain:
GENERIC_400_INVALID_CURRENCY_FOR_BLOCKCHAIN:
description: Invalid currency

Check failure on line 360 in code/API_definitions/blockchain-public-address.yaml

View workflow job for this annotation

GitHub Actions / MegaLinter

360:44 [trailing-spaces] trailing spaces
value:
status: 400
code: BLOCKCHAIN_PUBLIC_ADDRESS.INVALID_CURRENCY
message: Indicated currency is not found
RequiredCurrencyForBlockchain:
GENERIC_400_REQUIRED_CURRENCY_FOR_BLOCKCHAIN:
description: Currency is required
value:
status: 400
code: BLOCKCHAIN_PUBLIC_ADDRESS.CURRENCY_REQUIRED
Expand All @@ -377,12 +381,14 @@ components:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
PermissionDenied:
GENERIC_403_PERMISSION_DENIED:
description: Permission denied. OAuth2 token access does not have the required scope or when the user fails operational security
value:
status: 403
code: PERMISSION_DENIED
message: "Operation not allowed: ..."
NotAllowedBlockchainNetworkId:
message: Client does not have sufficient permissions to perform this action.
GENERIC_403_NOT_ALLOWED_BLOCKCHAIN_NETWORK_ID:
description: blockchainNetworkId not allowed by business rules
value:
status: 403
code: BLOCKCHAIN_PUBLIC_ADDRESS.BLOCKCHAIN_NETWORK_IDENTIFIER_NOT_ALLOWED
Expand All @@ -396,23 +402,35 @@ components:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 400
code: INVALID_ARGUMENT
message: Client specified an invalid argument, request body or query param
examples:
GENERIC_400_INVALID_ARGUMENT:
description: Invalid Argument. Generic Syntax Exception
value:
status: 400
code: INVALID_ARGUMENT
message: Client specified an invalid argument, request body or query param.
Generic401:
description: Authentication problem with the client request
description: Unauthorized
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 401
code: UNAUTHENTICATED
message: Request not authenticated due to missing, invalid, or expired credentials
examples:
GENERIC_401_UNAUTHENTICATED:
description: Request cannot be authenticated
value:
status: 401
code: UNAUTHENTICATED
message: Request not authenticated due to missing, invalid, or expired credentials.
GENERIC_401_AUTHENTICATION_REQUIRED:
description: New authentication is needed, authentication is no longer valid
value:
status: 401
code: AUTHENTICATION_REQUIRED
message: New authentication is required.
Generic403:
description: Forbidden
headers:
Expand All @@ -422,10 +440,13 @@ components:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 403
code: PERMISSION_DENIED
message: "Operation not allowed: ..."
examples:
GENERIC_403_PERMISSION_DENIED:
description: Permission denied. OAuth2 token access does not have the required scope or when the user fails operational security
value:
status: 403
code: PERMISSION_DENIED
message: Client does not have sufficient permissions to perform this action.
Generic404:
description: Not found
headers:
Expand All @@ -435,10 +456,13 @@ components:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 404
code: NOT_FOUND
message: The specified resource is not found
examples:
GENERIC_404_NOT_FOUND:
description: Resource is not found
value:
status: 404
code: NOT_FOUND
message: The specified resource is not found.
Generic409:
description: Conflict
headers:
Expand All @@ -448,10 +472,13 @@ components:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 409
code: ALREADY_EXISTS
message: "A specified resource duplicate entry found"
examples:
GENERIC_409_ALREADY_EXISTS:
description: Trying to create an existing resource
value:
status: 409
code: ALREADY_EXISTS
message: The resource that a client tried to create already exists.
Generic429:
description: Too Many Requests
headers:
Expand All @@ -461,10 +488,13 @@ components:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 429
code: TOO_MANY_REQUESTS
message: Either out of resource quota or reaching rate limiting
examples:
GENERIC_429_TOO_MANY_REQUESTS:
description: API Server request limit is overpassed
value:
status: 429
code: TOO_MANY_REQUESTS
message: Either out of resource quota or reaching rate limiting.
Generic500:
description: Server error
headers:
Expand All @@ -474,10 +504,13 @@ components:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 500
code: INTERNAL
message: Server error
examples:
GENERIC_500_INTERNAL:
description: Problem in Server side. Regular Server Exception
value:
status: 500
code: INTERNAL
message: Unknown server error. Typically a server bug.
Generic503:
description: Service unavailable
headers:
Expand All @@ -487,10 +520,13 @@ components:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 503
code: UNAVAILABLE
message: Service unavailable
examples:
GENERIC_503_UNAVAILABLE:
description: Service is not available. Temporary situation usually related to maintenance process in the server side
value:
status: 503
code: UNAVAILABLE
message: Service Unavailable.
Generic504:
description: Request time exceeded. If it happens repeatedly, consider reducing the request complexity
headers:
Expand All @@ -500,7 +536,10 @@ components:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 504
code: TIMEOUT
message: Request timeout exceeded
examples:
GENERIC_504_TIMEOUT:
description: API Server Timeout
value:
status: 504
code: TIMEOUT
message: Request timeout exceeded.

0 comments on commit 73a5ddc

Please sign in to comment.