Fix credential usage and error output

This commit is contained in:
Omar Ajoue 2022-06-29 16:27:55 +02:00
commit de7c4dbed1
2 changed files with 3 additions and 6 deletions

View file

@ -1,9 +1,7 @@
import {
IAuthenticateGeneric,
ICredentialDataDecryptedObject,
ICredentialTestRequest,
ICredentialType,
IHttpRequestOptions,
INodeProperties,
} from 'n8n-workflow';
@ -33,9 +31,8 @@ export class HttpBinApi implements ICredentialType {
authenticate = {
type: 'generic',
properties: {
header: {
name: 'api-key',
value: '={{$credentials.apiKey}}',
headers: {
Authorization: '={{"Bearer " + $credentials.token}}',
},
},
} as IAuthenticateGeneric;

View file

@ -61,7 +61,7 @@ export class ExampleNode implements INodeType {
error.context.itemIndex = itemIndex;
throw error;
}
throw new NodeOperationError(this.getNode(), error.message, {
throw new NodeOperationError(this.getNode(), error, {
itemIndex,
});
}