Fix credential usage and error output
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
IAuthenticateGeneric,
|
IAuthenticateGeneric,
|
||||||
ICredentialDataDecryptedObject,
|
|
||||||
ICredentialTestRequest,
|
ICredentialTestRequest,
|
||||||
ICredentialType,
|
ICredentialType,
|
||||||
IHttpRequestOptions,
|
|
||||||
INodeProperties,
|
INodeProperties,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
@@ -33,9 +31,8 @@ export class HttpBinApi implements ICredentialType {
|
|||||||
authenticate = {
|
authenticate = {
|
||||||
type: 'generic',
|
type: 'generic',
|
||||||
properties: {
|
properties: {
|
||||||
header: {
|
headers: {
|
||||||
name: 'api-key',
|
Authorization: '={{"Bearer " + $credentials.token}}',
|
||||||
value: '={{$credentials.apiKey}}',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as IAuthenticateGeneric;
|
} as IAuthenticateGeneric;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export class ExampleNode implements INodeType {
|
|||||||
error.context.itemIndex = itemIndex;
|
error.context.itemIndex = itemIndex;
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
throw new NodeOperationError(this.getNode(), error.message, {
|
throw new NodeOperationError(this.getNode(), error, {
|
||||||
itemIndex,
|
itemIndex,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user