Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Errors are not properly logged so information is lost #20

Closed
5 tasks done
KeesCBakker opened this issue Aug 3, 2023 · 1 comment · Fixed by #21
Closed
5 tasks done

Errors are not properly logged so information is lost #20

KeesCBakker opened this issue Aug 3, 2023 · 1 comment · Fixed by #21
Labels

Comments

@KeesCBakker
Copy link

Description

The errors are not properly logged, so information is lost.

Example:

{"level":50,"time":1691049579405,"pid":8732,"hostname":"macbook063","name":"jarvisbeta","msg":"Dropping message due to error An API error occurred: missing_scope"}

With proper logging (a test on another error) we could get:

{"level":50,"time":1691049579362,"pid":8732,"hostname":"macbook063","name":"jarvisbeta","err":{"type":"Error","message":"An API error occurred: missing_scope","stack":"Error: An API error occurred: missing_scope\n    at platformErrorFromResult (C:\\projects\\blaze-slack-chatops-service\\node_modules\\@slack\\web-api\\src\\errors.ts:108:5)\n    at WebClient.apiCall (C:\\projects\\blaze-slack-chatops-service\\node_modules\\@slack\\web-api\\src\\WebClient.ts:280:36)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Promise.all (index 1)","code":"slack_webapi_platform_error","data":{"ok":false,"error":"missing_scope","needed":"channels:read","provided":"app_mentions:read,channels:join,channels:history,chat:write,im:write,im:history,users:read,groups:history,groups:write,mpim:history,mpim:write,im:read,groups:read,mpim:read","response_metadata":{"scopes":["app_mentions:read","channels:join","channels:history","chat:write","im:write","im:history","users:read","groups:history","groups:write","mpim:history","mpim:write","im:read","groups:read","mpim:read"],"acceptedScopes":["channels:read","groups:read","mpim:read","im:read","read"]}}},"msg":"An error occurred while building text: An API error occurred: missing_scope"}

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

I'll create a PR for this.

@github-actions
Copy link

github-actions bot commented Aug 3, 2023

🎉 This issue has been resolved in version 1.0.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant