Files
n8n-nodes-strike/node_modules/n8n-workflow/dist/esm/metadata-utils.js
Martien 5605b9b49a Initial commit: n8n Strike API node
- Add Strike API credentials configuration
- Implement Strike node with 9 resources (Account, Balance, Currency Exchange, Deposit, Invoice, Payment, Payment Method, Payout, Rates)
- Add comprehensive operation descriptions for all resources
- Include CLAUDE.MD documentation
- Set up build configuration with TypeScript, ESLint, and Prettier

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 11:00:38 +01:00

24 lines
949 B
JavaScript

import { hasKey } from './utils';
function responseHasSubworkflowData(response) {
return ['executionId', 'workflowId'].every((x) => hasKey(response, x) && typeof response[x] === 'string');
}
function parseErrorResponseWorkflowMetadata(response) {
if (!responseHasSubworkflowData(response))
return undefined;
return {
subExecution: {
executionId: response.executionId,
workflowId: response.workflowId,
},
subExecutionsCount: 1,
};
}
export function parseErrorMetadata(error) {
if (hasKey(error, 'errorResponse')) {
return parseErrorResponseWorkflowMetadata(error.errorResponse);
}
// This accounts for cases where the backend attaches the properties on plain errors
// e.g. from custom nodes throwing literal `Error` or `ApplicationError` objects directly
return parseErrorResponseWorkflowMetadata(error);
}
//# sourceMappingURL=metadata-utils.js.map