Skip to content

Commit

Permalink
Fixed issue when error was inside a promise
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorDiaconu committed Apr 12, 2019
1 parent 748253c commit 6cc558c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions server/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function initialize(apolloConfig = {}, meteorApolloConfig = {}) {
debug: Meteor.isDevelopment,
path: '/graphql',
formatError: e => {
console.error(e.toString(), '\n', JSON.stringify(e, null, 4));
console.error(e);

return {
message: e.message,
Expand Down Expand Up @@ -99,12 +99,8 @@ function getContextCreator(meteorApolloConfig, defaultContextResolver) {
let userContext = {};
if (Package['accounts-base']) {
const loginToken =
req.headers['meteor-login-token'] ||
req.cookies['meteor-login-token'];
userContext = await getUserForContext(
loginToken,
meteorApolloConfig.userFields
);
req.headers['meteor-login-token'] || req.cookies['meteor-login-token'];
userContext = await getUserForContext(loginToken, meteorApolloConfig.userFields);
}

return {
Expand Down

0 comments on commit 6cc558c

Please sign in to comment.