ArboreumDev / credit-union-frontend

Frontend in Next.js + Typescript + GraphQL
https://frontend-two-sandy.vercel.app
1 stars 0 forks source link

swarmai errors must have codes and UI be updated accordingly #147

Open gparuthi opened 3 years ago

gparuthi commented 3 years ago

https://github.com/ArboreumDev/frontend/blob/8345bff7a812e3ca3377f095cd79516e731bcea4/src/lib/api.ts#L55-L55

djudjuu commented 3 years ago

I think swarmai does have codes, so we just should be able to mirror those exceptions...unless maybe the Internal error...that is some that shouldnt occur and thus the user should never see the details

https://github.com/ArboreumDev/swarmai/blob/development/app/routes/swarmai.py

the err.msg they return should also be informative....

or were you imiagining an APIException-class?

gparuthi commented 3 years ago

Oh thats true, internal errors should not be shown to users. We should find a way to get those errors logged somewhere.

gparuthi commented 3 years ago

Btw I added a related issue #153 , not sure what we can add here