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

Broken UX of SDK error reporting #542

Open
medikoo opened this issue Feb 24, 2021 · 0 comments
Open

Broken UX of SDK error reporting #542

medikoo opened this issue Feb 24, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@medikoo
Copy link
Contributor

medikoo commented Feb 24, 2021

Currently when SDK errors with user error, the error as presented to use is in form that we present programmer errors, with full stack trace:

Serverless: Using local credentials. Add provider credentials via dashboard: https://app.serverless.com/mariusznowak/apps/medikoo-test/test-dashboard/dev/us-east-1/providers
 
  Error --------------------------------------------------
 
  Error: {"errorMessage":"The provided access key is not authorized for this operation. - Please contact support and provide this identifier to reference this issue - NWX36WG5HH6P"}
      at _callee$ (/Users/medikoo/npm-packages/@serverless/platform-sdk/src/utils/checkHttpResponse.js:19:9)
      at tryCatch (/usr/local/lib/node_modules/regenerator-runtime/runtime.js:63:40)
      at Generator.invoke [as _invoke] (/usr/local/lib/node_modules/regenerator-runtime/runtime.js:293:22)
      at Generator.next (/usr/local/lib/node_modules/regenerator-runtime/runtime.js:118:21)
      at step (/Users/medikoo/npm-packages/@serverless/platform-sdk/dist/utils/checkHttpResponse.js:7:191)
      at /Users/medikoo/npm-packages/@serverless/platform-sdk/dist/utils/checkHttpResponse.js:7:361
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              14.16.0
     Framework Version:         2.26.0
     Plugin Version:            4.4.3
     SDK Version:               2.3.2
     Components Version:        3.7.1

Those error should be reported with ServerlessError, where just meaningful message is shown, and they should not be in form of stringified JSON

@medikoo medikoo added the bug Something isn't working label Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant