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

[WebApiError] Error message type should be a string. #471

Open
acantepie opened this issue Nov 26, 2022 · 1 comment
Open

[WebApiError] Error message type should be a string. #471

acantepie opened this issue Nov 26, 2022 · 1 comment

Comments

@acantepie
Copy link

Hi,

Error message triggered by library should be a string, not an object.

The following code is the cause of the problem :

https://github.com/thelinmichael/spotify-web-api-node/blob/master/src/http-manager.js#L47

  /* Other type of error, or unhandled Web API error format */
  return new WebapiError(response.body, response.headers, response.statusCode, response.body);

https://github.com/thelinmichael/spotify-web-api-node/blob/master/src/response-error.js#L17

class WebapiError extends NamedError {
  constructor(body, headers, statusCode, message) {
    super(message);
    this.body = body;
    this.headers = headers;
    this.statusCode = statusCode;
  }
@ameetmadan
Copy link

+1

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

No branches or pull requests

2 participants