feat(core): Reduce the number of events sent to Sentry (#6235)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-05-15 13:54:48 +00:00
committed by GitHub
parent 9182d1558a
commit a4c0cc9b5c
5 changed files with 49 additions and 9 deletions

View File

@@ -1392,6 +1392,7 @@ export async function httpRequestWithAuthentication(
throw new NodeOperationError(
node,
`Node "${node.name}" does not have any credentials of type "${credentialsType}" set!`,
{ severity: 'warning' },
);
}
@@ -1587,6 +1588,7 @@ export async function requestWithAuthentication(
throw new NodeOperationError(
node,
`Node "${node.name}" does not have any credentials of type "${credentialsType}" set!`,
{ severity: 'warning' },
);
}
@@ -1745,6 +1747,7 @@ export async function getCredentials(
throw new NodeOperationError(
node,
`Node type "${node.type}" does not have any credentials defined!`,
{ severity: 'warning' },
);
}
@@ -1755,6 +1758,7 @@ export async function getCredentials(
throw new NodeOperationError(
node,
`Node type "${node.type}" does not have any credentials of type "${type}" defined!`,
{ severity: 'warning' },
);
}
@@ -1778,10 +1782,16 @@ export async function getCredentials(
if (nodeCredentialDescription?.required === true) {
// Credentials are required so error
if (!node.credentials) {
throw new NodeOperationError(node, 'Node does not have any credentials set!');
throw new NodeOperationError(node, 'Node does not have any credentials set!', {
severity: 'warning',
});
}
if (!node.credentials[type]) {
throw new NodeOperationError(node, `Node does not have any credentials set for "${type}"!`);
throw new NodeOperationError(
node,
`Node does not have any credentials set for "${type}"!`,
{ severity: 'warning' },
);
}
} else {
// Credentials are not required