Skip to content

Commit

Permalink
chore: account for early exit and stop timer
Browse files Browse the repository at this point in the history
Signed-off-by: Case Wylie <[email protected]>
  • Loading branch information
cmwylie19 committed Mar 5, 2025
1 parent f119bcd commit eb48e42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/processors/mutate-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export async function mutateProcessor(
for (const bindable of bindables) {
({ wrapped, response } = await processRequest(bindable, wrapped, response));
if (config.onError === OnError.REJECT && response?.warnings!.length > 0) {
webhookTimer.stop();
return response;
}
}
Expand All @@ -196,11 +197,13 @@ export async function mutateProcessor(
// If no capability matched the request, exit early
if (bindables.length === 0) {
Log.info(reqMetadata, `No matching actions found`);
webhookTimer.stop();
return response;
}

// delete operations can't be mutate, just return before the transformation
if (req.operation === "DELETE") {
webhookTimer.stop();
return response;
}

Expand Down

0 comments on commit eb48e42

Please sign in to comment.