Skip to content
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.

app crash on 503 error during initialization #133

Open
rdegges opened this issue Dec 22, 2014 · 10 comments
Open

app crash on 503 error during initialization #133

rdegges opened this issue Dec 22, 2014 · 10 comments
Assignees

Comments

@rdegges
Copy link
Contributor

rdegges commented Dec 22, 2014

NOTE: I'm manually moving this report here as it was initially filed against our Express repo: stormpath/express-stormpath#46

For a few minutes, I got the following error during startup of my application.

Stormpath seems to have responded with a 503 status code, which crashed the app.

Meanwhile, everything is working fine again, so I assume that there is an uncaught issue when creating the callback for the request module.

ERROR

/bastian/appxyz/node_modules/express-stormpath/node_modules/stormpath/lib/error/ResourceError.js:7
  this.status = responseBody.status;
                            ^
TypeError: Cannot read property 'status' of undefined
    at new ResourceError (/bastian/appxyz/node_modules/express-stormpath/node_modules/stormpath/lib/error/ResourceError.js:7:29)
    at Request.onRequestResult [as _callback] (/bastian/appxyz/node_modules/express-stormpath/node_modules/stormpath/lib/ds/RequestExecutor.js:96:23)
    at Request.self.callback (/bastian/appxyz/node_modules/express-stormpath/node_modules/stormpath/node_modules/request/request.js:123:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (/bastian/appxyz/node_modules/express-stormpath/node_modules/stormpath/node_modules/request/request.js:1047:14)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/bastian/appxyz/node_modules/express-stormpath/node_modules/stormpath/node_modules/request/request.js:998:12)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:929:16
    at process._tickCallback (node.js:419:13)

ORIGIN stormpath/lib/ds/RequestExectuor.js

if (response.statusCode > 399) {
      return callback(new ResourceError(body), null);
    }
@jonpaine
Copy link

Giving this a bump. Experiencing identical error on 0.9.1. Of course, I see you guys are having a major outage to handle, which is what's causing this, but it would be nice to prioritize a more graceful failure mode. Thanks!

@dannytranlx
Copy link

+1

@rdegges
Copy link
Contributor Author

rdegges commented Feb 20, 2015

Agreed. I'm working on this with @robertjd on Monday. Sorry for the issues :(

This will be really nice once we get it in there =)

@jonpaine
Copy link

Not a problem - good luck today!

@rdegges
Copy link
Contributor Author

rdegges commented Feb 20, 2015

Thank you! Also, FYI: things are back to normal per our statuspage: http://status.stormpath.com/

@alavers
Copy link

alavers commented Mar 6, 2015

I guess the chances are slim of this being fixed before the scheduled maintenance downtime tomorrow? :(

@robertjd
Copy link
Member

robertjd commented Mar 6, 2015

Ah! Looking at this right now..

@robertjd
Copy link
Member

robertjd commented Mar 6, 2015

I just published 0.9.2 which has this change: dbe131a

It will give you back an error, and the status will be 503 - I'm considering this a quick fix until we do something more robust like #134

@alavers
Copy link

alavers commented Aug 31, 2015

Any progress on this? Currently encountering another stormpath outage which is causing our node apps to crash on startup.

@robertjd
Copy link
Member

It is my understanding that we fixed the problem that was originally mentioned in this post, but I'll investigate how this library handles

  • 500 errors from the API
  • request timeouts.

@robertjd robertjd self-assigned this Oct 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants