Closed Bug 922759 Opened 11 years ago Closed 11 years ago

Add numeric error codes to Basket API

Categories

(www.mozilla.org :: Newsletters, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dpoirier, Assigned: dpoirier)

References

Details

As the Basket API becomes more sophisticated, there are more ways a call can fail. Currently, callers have to detect errors based on HTTP status code and an english error string, which can be fragile. Adding a numeric error code when a call fails will allow callers to know what the problem was without ambiguity.
Assignee: nobody → dpoirier
Basket-client pull request: https://github.com/mozilla/basket-client/pull/22
Basket pull request: https://github.com/mozilla/basket/pull/85 (will need to be updated after basket-client PR is merged, but can be reviewed now)
Commits pushed to master at https://github.com/mozilla/basket

https://github.com/mozilla/basket/commit/08b8aacb4fb8e734d803ed2022de349252426bcb
Bug 922759 - Return numeric error codes

https://github.com/mozilla/basket/commit/09cbf9cc1b5d0d618c7d759dc55145c96884c1b8
Merge pull request #85 from dpoirier/bug-922759-basket-error-codes

Bug 922759 - Return numeric error codes
Commits pushed to master at https://github.com/mozilla/basket-client

https://github.com/mozilla/basket-client/commit/d6b6ebe0dea4077a59173f34857c59301a315c1c
Bug 922759 - Fix parsing of responses without content type

https://github.com/mozilla/basket-client/commit/217a062ea54d8cfd7500f7cb86c6756e097e8fa1
Merge pull request #23 from dpoirier/handle-response-no-content-type

Bug 922759 - Fix parsing of responses without content type
Has this made it to production?
Surely this is in production by now?
Pmac - can you confirm that this has gone live and is working well?
Flags: needinfo?(pmac)
Looks like it is not in production. Latest push bug I could find was for v2013.12 and that tag does not include this commit:

https://github.com/mozilla/basket/compare/v2013.12...master

I'm trying to get the remaining PRs reviewed and merged, then we can get a prod push together.

:dpoirier, do you need these codes now? We can push this out sooner if you need it.
Flags: needinfo?(pmac)
Not now, but soon; the Mozillians updates for the updated Basket API assume numeric error codes, and are currently in review.
Depends on: 944055
:dpoirier Just filed bug 944055 to push basket. You should mark your mozillians bug as blocked.
Flags: needinfo?(dpoirier)
This is fixed in prod.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Flags: needinfo?(dpoirier)
You need to log in before you can comment on or make changes to this bug.