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

All promise rejections should have the same format #20

@crantila

Description

@crantila

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions