Closed blackgirlbytes closed 2 years ago
It looks like the object that is logged out is coming from here:
Can you somehow edit the code directly and log out the error
object above line 29?
I think we should also be able add more information beyond just statusCode
and error
, but I'm not sure if there is a certain schema we have to follow when returning the object from the lambda function?
I tried adding a console.log in the file in my code, but I'm not able to see any of the logs..so I made a temporary PR.
https://github.com/probot/adapter-aws-lambda-serverless/pull/85/files
GitHubAn extension for running Probot on Lambda. Contribute to probot/adapter-aws-lambda-serverless development by creating an account on GitHub.
ref https://github.com/probot/adapter-aws-lambda-serverless/pull/85
When you run sls invoke --function router
, does that run your lambda function? The function assumes that it receives a GitHub Webhook request, with a JSON request body and the correct signature. I'm not sure if invoking it from the command line like that will work?
oh 🤦♀️ That makes a lot of sense. I thought that sls invoke was running the lambda function was running everything in full. I tried it out with just a sls deploy and actually starring my repo. I didn't receive that error anymore. Thanks for your patience..So I'm good over here for now. Just user error and nothing to do with probot or octokit.
if you don't mind, I wonder if the additional error context is helpful. When you run sls invoke --function router
with the beta version we just released, what does the output look like now? Could you share it please?
unfortunately ,when I ran sls invoke --function router after installing the beta version, it didn't print any information from my console.log(). I still saw the same message of {statusCode: 500, error: "oops"}
😞
okay no worries, thanks for checking.
I guess we can close this issue now?
I'm building a probot app that when a user stars a repo, they either get invited to the repo or an issue is opened depending on specific situations. The probot app was working great when I tested via smee, but now that I've put this up on aws lambda I've run into issues.
Initially, I had followed directions from this guide: https://bdougie.github.io/sls-probot-guide/
I realized that part of my issue was the directions are using a deprecated npm package called @probot/serverless-lambda.
I followed the directions found in this repository, and I'm using @probot/adapter-aws-lambda-serverless instead, but when I hit my lambda function, I receive an error that's not very descriptive. It just says "oops".
See screenshot:
Here's my PR: https://github.com/maintainers/invite-automation/pull/33/files
https://github.com/maintainers/invite-automation: whole repo
For my GitHub app..I updated my url. Perhaps, I haven't done that part correctly?