Skip to content

Commit

Permalink
Add action error
Browse files Browse the repository at this point in the history
  • Loading branch information
dangtony98 committed Jan 1, 2023
1 parent 6f054d8 commit 0aff94c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions backend/src/utils/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,14 @@ export const SecretNotFoundError = (error?: Partial<RequestErrorContext>) => new
stack: error?.stack
});

//* ----->[ACTION ERRORS]<-----
export const ActionNotFoundError = (error?: Partial<RequestErrorContext>) => new RequestError({
logLevel: error?.logLevel ?? LogLevel.ERROR,
statusCode: error?.statusCode ?? 404,
type: error?.type ?? 'action_not_found_error',
message: error?.message ?? 'The requested action was not found',
context: error?.context,
stack: error?.stack
});

//* ----->[MISC ERRORS]<-----

1 comment on commit 0aff94c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report for backend

St.
Category Percentage Covered / Total
🟡 Statements 70.59% 48/68
🔴 Branches 0% 0/5
🔴 Functions 50% 1/2
🟡 Lines 71.64% 48/67

Test suite run success

1 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from 0aff94c

Please sign in to comment.