ground-x / caver-js-ext-kas

Apache License 2.0
13 stars 15 forks source link

Return error object when ErrorResponse is came #45

Closed jimni1222 closed 3 years ago

jimni1222 commented 3 years ago

Proposed changes

This PR introduces the contents of passing an error to callback when an ErrorResponse from KAS comes as a response.

Previously, ErrorResponse was also processed as data, but in this case, it is more difficult to handle errors, so change to throw as an error in case of ErrorRseponse.

Types of changes

Please put an x in the boxes related to your change.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Related issues

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...