SSWConsulting / SSWConsulting/SSW.Rewards.Mobile
Refactor Api - Review exceptions
@matt-goldman is already working on this.
Since Feb 26, 2024.
- Dominant language
- C#
- Stars
- 37
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
Exceptions are slow, we should move away from throwing exceptions inside routes and correctly set status codes instead of the blanket 500.
... exceptions should be used for truly exceptional circumstances.
- Matt G
See:
https://www.ssw.com.au/rules/do-you-know-that-you-should-never-throw-an-exception-using-system-exception/
https://www.ssw.com.au/rules/do-you-catch-exceptions-precisely/
https://www.ssw.com.au/rules/do-you-return-the-correct-response-code/
https://www.ssw.com.au/rules/do-you-return-detailed-error-messages/
https://www.ssw.com.au/rules/use-fluent-validation/
- Ctrl+Shift+F 'throw new'
- Ensure it is appropriate to throw an exception
- Ensure exception is handled by the
ApiExceptionFilter
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.