From 39a7af74e573f2508a06708d4ff4f8ad55114b20 Mon Sep 17 00:00:00 2001 From: Adrien Cantepie Date: Sat, 26 Nov 2022 20:53:33 +0100 Subject: [PATCH] #471 [WebApiError] Error message type should be a string --- src/http-manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http-manager.js b/src/http-manager.js index 6c3991fa..3f1531c6 100644 --- a/src/http-manager.js +++ b/src/http-manager.js @@ -44,7 +44,7 @@ var _toError = function(response) { } /* Other type of error, or unhandled Web API error format */ - return new WebapiError(response.body, response.headers, response.statusCode, response.body); + return new WebapiError(response.body, response.headers, response.statusCode, 'An error occurred while communicating with Spotify\'s Web API.'); }; /* Make the request to the Web API */ @@ -130,4 +130,4 @@ HttpManager.put = function(request, callback) { HttpManager._makeRequest(method, options, request.getURI(), callback); }; -module.exports = HttpManager; \ No newline at end of file +module.exports = HttpManager;