mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
⚡ Fixed Contentful error parsing, added missing comma in entryDescription
This commit is contained in:
parent
198cd6258c
commit
322b94255a
|
@ -200,7 +200,7 @@ export const fields = [
|
|||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
|
|
|
@ -39,17 +39,7 @@ export async function contentfulApiRequest(this: IExecuteFunctions | IExecuteSin
|
|||
try {
|
||||
return await this.helpers.request!(options);
|
||||
} catch (error) {
|
||||
|
||||
let errorMessage = error;
|
||||
|
||||
// if (error.response && error.response.body && error.response.body.details) {
|
||||
// const details = error.response.body.details;
|
||||
// errorMessage = details.errors.map((e: IDataObject) => e.details).join('|');
|
||||
// } else if (error.response && error.response.body && error.response.body.message) {
|
||||
// errorMessage = error.response.body.message;
|
||||
// }
|
||||
|
||||
throw new Error(`Contentful error response [${error.statusCode}]: ${errorMessage}`);
|
||||
throw new Error(`Contentful error response [${error.statusCode}]: ${error.error.message}`);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue