mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
👕 Fix built issue by fixing lint issues
This commit is contained in:
@@ -48,17 +48,17 @@ export async function spotifyApiRequest(this: IHookFunctions | IExecuteFunctions
|
||||
return await this.helpers.requestOAuth2.call(this, 'spotifyOAuth2Api', options);
|
||||
} catch (error) {
|
||||
if (error.statusCode === 401) {
|
||||
// Return a clear error
|
||||
throw new Error('The Spotify credentials are not valid!');
|
||||
}
|
||||
// Return a clear error
|
||||
throw new Error('The Spotify credentials are not valid!');
|
||||
}
|
||||
|
||||
if (error.error && error.error.error && error.error.error.message) {
|
||||
// Try to return the error prettier
|
||||
throw new Error(`Spotify error response [${error.error.error.status}]: ${error.error.error.message}`);
|
||||
}
|
||||
if (error.error && error.error.error && error.error.error.message) {
|
||||
// Try to return the error prettier
|
||||
throw new Error(`Spotify error response [${error.error.error.status}]: ${error.error.error.message}`);
|
||||
}
|
||||
|
||||
// If that data does not exist for some reason return the actual error
|
||||
throw error;
|
||||
// If that data does not exist for some reason return the actual error
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user