Skip to content

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

@acantepie

Description

@acantepie

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;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions