mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -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',
|
displayName: 'Options',
|
||||||
name: 'options',
|
name: 'options',
|
||||||
|
|
|
@ -39,17 +39,7 @@ export async function contentfulApiRequest(this: IExecuteFunctions | IExecuteSin
|
||||||
try {
|
try {
|
||||||
return await this.helpers.request!(options);
|
return await this.helpers.request!(options);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
throw new Error(`Contentful error response [${error.statusCode}]: ${error.error.message}`);
|
||||||
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}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue