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

Improve the debugging experience when a payload is involved #471

Open
k3n opened this issue Aug 25, 2020 · 1 comment
Open

Improve the debugging experience when a payload is involved #471

k3n opened this issue Aug 25, 2020 · 1 comment
Labels
feature New functionality or improvement

Comments

@k3n
Copy link

k3n commented Aug 25, 2020

Support plan

  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: 12
  • module version: 10.0.0
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): hapi
  • any other relevant information: salesforce oauth2

What problem are you trying to solve?

The payload is still a Buffer when it's passed to Boom; if parsed, then the error would've been front & center and saved a lot of time.

{ Error: Failed obtaining custom access token
    at Object.authenticate (/Users/k3n/code/project/node_modules/bell/lib/oauth.js:276:43)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  data:
   <Buffer 54 68 65 ... >,

The error here (captured in the payload) was:

The URL has moved <a href "https://instance.my.salesforce.com/services/oauth2/token">here</a>\r\n

Do you have a new or modified API suggestion to solve the problem?

Other than parsing the payload before passing it to Boom, no.

@k3n k3n added the feature New functionality or improvement label Aug 25, 2020
@Nargonath
Copy link
Member

Would you mind sharing a reproduction test, please?

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

No branches or pull requests

2 participants