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

Improve service errors - add more context #347

Closed
6 tasks done
NicolasMahe opened this issue Aug 8, 2018 · 1 comment
Closed
6 tasks done

Improve service errors - add more context #347

NicolasMahe opened this issue Aug 8, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@NicolasMahe
Copy link
Member

NicolasMahe commented Aug 8, 2018

The errors of the validation functions for the service's data are not good enough. They are not explicit enough.

https://github.com/mesg-foundation/core/blob/bd84ad1d54eadfb8aa2bd79ac0c7c68f775f9c03/service/error.go#L14-L18

  • Rename Key to EventKey to be more specific

https://github.com/mesg-foundation/core/blob/bd84ad1d54eadfb8aa2bd79ac0c7c68f775f9c03/service/error.go#L38-L43

  • Rename Key to TaskKey to be more specific

https://github.com/mesg-foundation/core/blob/bd84ad1d54eadfb8aa2bd79ac0c7c68f775f9c03/service/error.go#L53-L61

  • Add TaskKey to OutputNotFoundError error to give more context

https://github.com/mesg-foundation/core/blob/bd84ad1d54eadfb8aa2bd79ac0c7c68f775f9c03/service/error.go#L63-L76

  • Rename Key to OutputKey to be more specific
  • Add TaskKey to InvalidOutputDataError to give more context
  • e.Key is the outputKey, not the task key. The errorString has to be fixed and also include the add TaskKey.
@NicolasMahe NicolasMahe added enhancement New feature or request good first issue Good for newcomers application labels Aug 8, 2018
@NicolasMahe NicolasMahe added this to the v1.1.0 milestone Aug 8, 2018
@ilgooz
Copy link
Contributor

ilgooz commented Aug 14, 2018

related with #337.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants