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 has been archived by the owner on Mar 31, 2020. It is now read-only.
andreineculau 2 days ago
I personally would have liked 1) the error to be more uniform 2) the errors to be categorized e.g.
-type error_reason() :: { 'schema_invalid'
, Schema :: json_term()
, Error :: schema_error()
}
| { 'data_invalid'
, Schema :: json_term()
, Error :: data_error()
, Data :: json_term()
}.
-type schema_error() :: {schema_error_id(), Details :: any() }
-type schema_error_id() :: 'missing_id_field'
| ...
-type data_error() :: {data_error_id(), Details :: any() }
-type data_error_id() :: 'missing_required_property'
| ...
Reason: improved/clearer documentation IMO, and cleaner pattern matching.
Just a thought, @Cy6erBr4in :) Nice effort
PS: the above is just to illustrate the pattern; the type definition (for Details) can be more explicit per *errorid and more documentation-driven
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: