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

Handle API gateway returning 503 with a response body of "busy" #44

Open
cer opened this issue Jul 27, 2017 · 3 comments
Open

Handle API gateway returning 503 with a response body of "busy" #44

cer opened this issue Jul 27, 2017 · 3 comments
Assignees

Comments

@cer
Copy link
Collaborator

cer commented Jul 27, 2017

Sleep, loop and retry?

@cer
Copy link
Collaborator Author

cer commented Jul 27, 2017

The gateway will return a 503 with a Retry-Header: 1. The client should sleep and retry the request if it gets this response with the header.

@cer
Copy link
Collaborator Author

cer commented Jul 27, 2017

@cer
Copy link
Collaborator Author

cer commented Jul 27, 2017

With the updated API gateway the error is now

{ ES Server Error: {"error":"busy"}
    at new EventuateServerError (/app/node_modules/@eventuateinc/eventuate-nodejs-client/dist/modules/EventuateServerError.js:23:11)
    at statusCodeError (/app/node_modules/@eventuateinc/eventuate-nodejs-client/dist/modules/EventuateClient.js:720:12)
    at /app/node_modules/@eventuateinc/eventuate-nodejs-client/dist/modules/EventuateClient.js:174:29
    at IncomingMessage.<anonymous> (/app/node_modules/@eventuateinc/eventuate-nodejs-client/dist/modules/EventuateClient.js:779:9)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickDomainCallback (internal/process/next_tick.js:122:9)
  name: 'ES Server Error',
  timestamp: undefined,
  status: undefined,
  statusCode: 503,
  error: 'Server returned status code 503',
  exception: undefined,
  message: '{"error":"busy"}',
  path: undefined }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants