HandCash / handcash-connect-sdk-js

MIT License
11 stars 14 forks source link

Error enumeration #21

Open eamanola opened 2 years ago

eamanola commented 2 years ago

Hi,

As the title says. Looking at https://docs.handcash.dev/errors/ there is a clear list of api errors.

However thinking forward, it might be useful to enumerate the errors, so clients can check the enumeration, instead of the message.

Either name, or a custom field, eg code or similar, would work.

Thanks in advance.

rafa-js commented 2 years ago

Hi @eamanola, thanks for your comment!

We came up with the same proposal for our internal API and it also affects HandCash Connect. It will be exactly what you described, some error code that describes exactly one context. Also, we'll improve the documentation so each specifies the possible errors for endpoint/function.

I'll keep this issue open to report the progress.

Thanks!