Skip to content

Commit

Permalink
Merge pull request #106 from nginformatica/feat/adjustments-message-429
Browse files Browse the repository at this point in the history
feat: adjustment in message 429 to receive a payload
  • Loading branch information
luiz-fischer authored Apr 17, 2024
2 parents 73dde65 + b8ae1b1 commit ba3f8b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quirons-broker",
"version": "0.0.1-alpha.122",
"version": "0.0.1-alpha.123",
"description": "A small library to expose the broker types",
"main": "index.ts",
"typings": "index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const getDetailedMessage = (payload: string, language: Language) => {
REQUIRED_BRANCH_ID: englishMessages['REQUIRED_BRANCH_ID'],
REQUIRED_ID_PARAMETER: englishMessages['REQUIRED_ID_PARAMETER'],
DECODED_ERROR: englishMessages['DECODED_ERROR'],
TOO_MANY_REQUESTS: englishMessages['TOO_MANY_REQUESTS']
TOO_MANY_REQUESTS: payload || englishMessages['TOO_MANY_REQUESTS']
}

const brazilianPortugueseDetailedMessages: Record<ErrorCode, string> = {
Expand All @@ -87,7 +87,7 @@ const getDetailedMessage = (payload: string, language: Language) => {
REQUIRED_BRANCH_ID: brazilianPortugueseMessages['REQUIRED_BRANCH_ID'],
REQUIRED_ID_PARAMETER: brazilianPortugueseMessages['REQUIRED_ID_PARAMETER'],
DECODED_ERROR: brazilianPortugueseMessages['DECODED_ERROR'],
TOO_MANY_REQUESTS: brazilianPortugueseMessages['TOO_MANY_REQUESTS']
TOO_MANY_REQUESTS: payload || brazilianPortugueseMessages['TOO_MANY_REQUESTS']
}

if (language === 'pt-BR') {
Expand Down

0 comments on commit ba3f8b4

Please sign in to comment.