Skip to content
This repository has been archived by the owner. It is now read-only.

prod 500 errors for /v1/profile on possible network glitch #151

Closed
jrgm opened this issue Oct 2, 2015 · 3 comments
Closed

prod 500 errors for /v1/profile on possible network glitch #151

jrgm opened this issue Oct 2, 2015 · 3 comments
Assignees
Labels

Comments

@jrgm
Copy link
Contributor

@jrgm jrgm commented Oct 2, 2015

This may have just been a network glitch but there was a burst of 500's in production, about 24. But this code could use a null check. - https://github.com/mozilla/fxa-profile-server/blob/master/lib/server/web.js#L64

{"Timestamp":1443753325303000000,"Logger":"fxa-profile-server","Type":"server.summary","Severity":2,"Pid":2069,"EnvVersion":"2.0",
 "Fields":{"code":500,"method":"get","errno":999,"path":"/v1/profile",
  "agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0","t":22156,
  "stack":"TypeError: Uncaught error: Cannot read property 'code' of undefined
    at Request._callback (/data/fxa-profile-server/lib/server/web.js:64:19)
    at Request.self.callback (/data/fxa-profile-server/node_modules/request/request.js:372:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (/data/fxa-profile-server/node_modules/request/request.js:1310:14)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/data/fxa-profile-server/node_modules/request/request.js:1258:12)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:944:16
    at process._tickDomainCallback (node.js:492:13)"}}
@seanmonstar
Copy link
Member

@seanmonstar seanmonstar commented Oct 2, 2015

We can add a null check for sure. I think this would still be a 503,
however.

On Fri, Oct 2, 2015, 10:26 AM John Morrison notifications@github.com
wrote:

This may have just been a network glitch but there was a burst of 500's in
production, about 24. But this code use a null check.

{"Timestamp":1443753325303000000,"Logger":"fxa-profile-server","Type":"server.summary","Severity":2,"Pid":2069,"EnvVersion":"2.0",
"Fields":{"code":500,"method":"get","errno":999,"path":"/v1/profile",
"agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0","t":22156,
"stack":"TypeError: Uncaught error: Cannot read property 'code' of undefined
at Request._callback (/data/fxa-profile-server/lib/server/web.js:64:19)
at Request.self.callback (/data/fxa-profile-server/node_modules/request/request.js:372:22)
at Request.emit (events.js:98:17)
at Request. (/data/fxa-profile-server/node_modules/request/request.js:1310:14)
at Request.emit (events.js:117:20)
at IncomingMessage. (/data/fxa-profile-server/node_modules/request/request.js:1258:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickDomainCallback (node.js:492:13)"}}


Reply to this email directly or view it on GitHub
#151.

@jrgm
Copy link
Contributor Author

@jrgm jrgm commented Oct 3, 2015

We can add a null check for sure. I think this would still be a 503, however.

Yeah, valid point; it is a server error, either 500 or 503, probably 503. Such a limited set of choices. Still, marginally better to have a diagnosed error (possibly still including a stack), than a TypeError.

@jrgm
Copy link
Contributor Author

@jrgm jrgm commented Oct 3, 2015

Such a limited set of choices.

Or, invent '530 Remote dependent service failed' or perhaps ' 530 SOA FTW' ;-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants