From a9b810a77565b77fb2d3a29569b8a9619e4a669a Mon Sep 17 00:00:00 2001 From: Sam Deere Date: Mon, 23 Jan 2017 10:00:00 -0800 Subject: [PATCH] fix(postgraphql): don't throw a 500 error if JWT is expired (#315) --- src/postgraphql/http/createPostGraphQLHttpRequestHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/postgraphql/http/createPostGraphQLHttpRequestHandler.js b/src/postgraphql/http/createPostGraphQLHttpRequestHandler.js index d214953e8e..5bdc6bf418 100644 --- a/src/postgraphql/http/createPostGraphQLHttpRequestHandler.js +++ b/src/postgraphql/http/createPostGraphQLHttpRequestHandler.js @@ -308,7 +308,7 @@ export default function createPostGraphQLHttpRequestHandler (options) { } catch (error) { // Set our status code and send the client our results! - if (res.statusCode === 200) res.statusCode = error.status || 500 + if (res.statusCode === 200) res.statusCode = error.status || error.statusCode || 500 result = { errors: [error] } // If the status code is 500, let’s log our error.