To be able to properly act on error s returned from service client, I need to be able to distinguish and understand it's errors and in case of error coming from Store API, be able to get details without parsing error message.
To achieve it, I am adding two custom errors: ServiceClientError generic error which should be thrown by service client and StoreApiError for non success responses from Store API.
To be able to properly act on error s returned from service client, I need to be able to distinguish and understand it's errors and in case of error coming from Store API, be able to get details without parsing error message.
To achieve it, I am adding two custom errors:
ServiceClientError
generic error which should be thrown by service client andStoreApiError
for non success responses from Store API.