mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix(Google Sheets Trigger Node): Return actual error message
This commit is contained in:
parent
c42820e82e
commit
ba5b4eb42f
|
@ -133,9 +133,9 @@ export async function apiRequest(
|
|||
}
|
||||
|
||||
if (error.message.includes('PERMISSION_DENIED')) {
|
||||
const message = 'Missing permissions for Google Sheet';
|
||||
const description =
|
||||
"Please check that the account you're using has the right permissions. (If you're trying to modify the sheet, you'll need edit access.)";
|
||||
const message = `Missing permissions for Google Sheet, ${error.message}}`;
|
||||
const details = error.description ? ` Details of the error: ${error.description}.` : '';
|
||||
const description = `Please check that the account you're using has the right permissions. (If you're trying to modify the sheet, you'll need edit access.)${details}`;
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject, { message, description });
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue