Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Test the APIs - Bad Gateway - Internal server error - errorMessage: e is not defined #280

Closed
rfdc opened this issue Oct 15, 2018 · 2 comments

Comments

@rfdc
Copy link

rfdc commented Oct 15, 2018

Hi there,
I've opened this issue cos #112 is too busy and long - hope that is ok.
I'm getting the following error:

Making API request
{ status: 502,
  statusText: 'Bad Gateway',
  data: { message: 'Internal server error' } }

CloudWatch logs shows:

{ 
    "errorMessage": "e is not defined", 
    "errorType": "ReferenceError", 
    "stackTrace": [ 
        "failure (/var/task/webpack:/libs/response-lib.js:10:42)", 
        "_callee$ (/var/task/webpack:/create.js:31:24)", 
        "tryCatch (/var/task/node_modules/regenerator-runtime/runtime.js:62:40)", 
        "Generator.invoke [as _invoke] (/var/task/node_modules/regenerator-runtime/runtime.js:296:22)", 
        "Generator.prototype.(anonymous function) [as throw] (/var/task/node_modules/regenerator-runtime/runtime.js:114:21)", 
        "step (/var/task/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)", "/var/task/node_modules/babel-runtime/helpers/asyncToGenerator.js:30:13", 
        "<anonymous>", 
        "process._tickDomainCallback (internal/process/next_tick.js:228:7)" 
        ] 
}

Dependencies:

"devDependencies": {
    "aws-sdk": "^2.334.0",
    "babel-core": "^6.26.3",
    "babel-loader": "^7.1.4",
    "babel-plugin-source-map-support": "^1.0.0",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-env": "^1.7.0",
    "babel-preset-stage-3": "^6.24.1",
    "jest": "^21.2.1",
    "serverless-offline": "^3.25.6",
    "serverless-webpack": "^5.1.0",
    "webpack": "^4.16.2",
    "webpack-node-externals": "^1.6.0"
  },
  "dependencies": {
    "babel-runtime": "^6.26.0",
    "source-map-support": "^0.4.18",
    "uuid": "^3.3.2"
  }

Local versions:

  • npm -v = 6.4.1
  • node -v = v10.11.0
  • serverless -v = 1.32.0

Any suggestions why is this happening?
Thanks

@jayair
Copy link
Contributor

jayair commented Oct 15, 2018

Hmmm I'm not sure what that error is. But does your libs/response-lib.js look like this?

https://github.com/AnomalyInnovations/serverless-stack-demo-api/blob/master/libs/response-lib.js

Also, we moved our chapter discussions here - https://discourse.serverless-stack.com

@rfdc
Copy link
Author

rfdc commented Oct 16, 2018

Hmmm I'm not sure what that error is. But does your libs/response-lib.js look like this?

https://github.com/AnomalyInnovations/serverless-stack-demo-api/blob/master/libs/response-lib.js

I had an extra console.log(e) there...sorry...i will try it again and will let you know..
thanks

@rfdc rfdc closed this as completed Oct 17, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants