Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

All promise rejections should have the same format #20

Open
crantila opened this issue Jul 27, 2016 · 0 comments
Open

All promise rejections should have the same format #20

crantila opened this issue Jul 27, 2016 · 0 comments
Assignees
Labels

Comments

@crantila
Copy link
Member

Currently, two types of data may result from a get() or search() Promise that's rejected:

  1. If a request is submitted to the Cantus server and the response code is not 200, the Promise is rejected with an object having the following members: code, reason, response.
  2. If there is an exception before the request is submitted, the Promise is rejected with a string.

If every Promise rejection used the three-member object described in the first point, error handling in client applications would be easier. We could use zero for the "code" when there's an exception.

@crantila crantila self-assigned this Jul 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant