The-Commit-Company / frappe-js-sdk

TypeScript/JavaScript library for Frappe REST API
MIT License
120 stars 43 forks source link

Add server message to error object #31

Closed frappeerpnext closed 1 year ago

frappeerpnext commented 1 year ago

When we make request via db or call object, if error occur from backend frappe send friendly message to client via _server_messages key. I cannot extract it in .catch((error) { ... }). It seems that you did not include it in error object.

Here is server message when I check in network response.

image

Could you please help include this message in .catch error object?

Thanks,

nikkothari22 commented 1 year ago

@frappeerpnext - yes this is something that needs to be added. I'll try adding it in.

frappeerpnext commented 1 year ago

Yes, I hope this will be added soon. These error information is very useful and we save a lot time to customize friendly message to end user.

Thanks,

frappeerpnext commented 1 year ago

Hi Guys, I have update and test it. Working perfect.

Big Thanks