hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

docs: standardise error types and error codes

Open bernard-eugine opened this issue 2 years ago • 2 comments

Type of Change

  • [ ] Bugfix
  • [ ] New feature
  • [x] Enhancement
  • [ ] Refactoring
  • [ ] Dependency updates

Description

Error types, codes and error messages were standardised

Additional Changes

  • [ ] This PR modifies the database schema
  • [ ] This PR modifies application configuration/environment variables

Motivation and Context

NA

How did you test it?

Checklist

  • [x] I formatted the code cargo +nightly fmt --all
  • [x] I addressed lints thrown by cargo clippy
  • [x] I reviewed submitted code
  • [ ] I added unit tests for my changes where possible
  • [ ] I added a CHANGELOG entry if applicable

bernard-eugine avatar Jan 19 '23 17:01 bernard-eugine

On what basis are HE_03 and HE_04 error codes assigned? I couldn't figure that out. Other than that, looks good to me!

HE03 would be ValidationErrors whereas HE04 would be ObjectNotFound. Need to change the first HE04 error to HE03. Will do it in the next PR.

bernard-eugine avatar Jan 20 '23 03:01 bernard-eugine

Need to change the first HE04 error to HE03. Will do it in the next PR.

If that is the only change required, we can do it in this PR.

SanchithHegde avatar Jan 20 '23 03:01 SanchithHegde