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.
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-client https://github.com/mozilla/basket-client/commit/eefdabb71c559639d5a15437a3095b7cc1435d5f Bug 922759 - Pass Basket numeric error codes to callers https://github.com/mozilla/basket-client/commit/e8aa6901fff1b83b31aa6e43c90f8a04b6bbe145 Bug 922759 - Add basket errors to README https://github.com/mozilla/basket-client/commit/4ef07f8ae3927f8fc2c548bd757d817d78015e07 Bug 922759 - Test that BasketException has the right error code https://github.com/mozilla/basket-client/commit/21292251212feb2633a0621e2f58c4e36f36b3b7 Merge pull request #22 from dpoirier/bug-922759-basket-numeric-error-codes Bug 922759 - Pass Basket numeric error codes to callers
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?
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.
Not now, but soon; the Mozillians updates for the updated Basket API assume numeric error codes, and are currently in review.
:dpoirier Just filed bug 944055 to push basket. You should mark your mozillians bug as blocked.
This is fixed in prod.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.