You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 18, 2020. It is now read-only.
* [CO-319] Fix account index swagger example
* [CO-319] Add roundtrip tests
* [CO-319] Fix recursive buildable instances
* [CO-319] Use strongly typed error
* [CO-319] Remove duplication in 'renderAccountIndexError'
* [CO-319] Distangle V1/Errors
This makes it now possible to import V1/Errors from the V1/Types module and leverage errors from this module.
One thing is still unclear to me: Why Errors isn't defined in V1/Types already?
There's a circular dependency between V1/Response and V1/Types if we go this way, as well as between
V1/Migration and V1/Types.
Nevertheless, it would make sense to have three data-types here:
- WalletError (defined in V1/Types)
- MigrationError (defined in V1/Types)
- JSONParsingError (defined in Response)
This way, we could remove the conflicting constructor from WalletError and remove the need for an
extra module here. It will also makes thing clearer
* [CO-319] Make V1/Error part of V1/Types
To realize this, we had to extract JSONValidationFailed and MigrationFailed constructor from WalletError.
They're now defined as constructor in different data-types (resp. JSONValidationError and MigrationError).
* [CO-319] Solve rebase conflicts
* [CO-319] Correctly format (jsend) newtype errors
This is rather ugly and could probably be achieved nicely with a better understanding of the
Generics.SOP library. As far as I could tell, there's no easy way to retrieve 'Tag' for single
constructor
(cf: 'For a datatype with a single constructor we do not need to tag values with their constructor; but for a datatype with multiple constructors we do. ')
0 commit comments