Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23966] Improve input error to provide reason of failure #203

Merged
merged 4 commits into from
Feb 14, 2022

Conversation

yafuquen
Copy link
Contributor

@yafuquen yafuquen commented Feb 10, 2022

Ticket

  • [23966]

Description

  • Create InputException to provide more info about the reason of failure

Commit message

  • feat: Improve input error to provide reason of failure

Screenshot

Screenshot_1644512225

Testing

  • Added unit tests
  • Ran unit tests successfully
  • Added documentation for public APIs and/or Wiki

@yafuquen yafuquen self-assigned this Feb 10, 2022
@yafuquen yafuquen added the enhancement New feature or request label Feb 10, 2022
@codecov
Copy link

codecov bot commented Feb 10, 2022

Codecov Report

❗ No coverage uploaded for pull request base (dev@c6b6200). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##             dev     #203   +/-   ##
======================================
  Coverage       ?   86.85%           
  Complexity     ?      252           
======================================
  Files          ?       44           
  Lines          ?     1073           
  Branches       ?      101           
======================================
  Hits           ?      932           
  Misses         ?       88           
  Partials       ?       53           
Flag Coverage Δ
unittests 86.85% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

* @param message associated message of the exception.
*/
sealed class InputException(override val message: String) : Exception(message)
object ExpiredChallengeException : InputException("Expired challenge can not be updated")
Copy link

Choose a reason for hiding this comment

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

should message be a string resource instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need localization for the message, the idea is to explain the reason to the developer.

@yafuquen yafuquen merged commit d2a9169 into dev Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants