Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[api-major] Replace MissingPDFException and UnexpectedResponseException with one exception #19264

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Snuffleupagus
Copy link
Collaborator

These old exceptions have a fair amount of overlap given how/where they are being used, which is likely because they were introduced at different points in time, hence we can shorten and simplify the code by replacing them with a more general ResponseException instead.

Besides an error message, the new ResponseException instances also include:

  • A numeric status field containing the server response status, similar to the old UnexpectedResponseException.

  • A boolean missing field, to allow easily detecting the situations where MissingPDFException was previously thrown.

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/ad9497973319ffc/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/0cce005a60c938d/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/0cce005a60c938d/output.txt

Total script time: 28.98 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/ad9497973319ffc/output.txt

Total script time: 54.33 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: Passed

@Snuffleupagus Snuffleupagus marked this pull request as ready for review December 29, 2024 11:21
@timvandermeij
Copy link
Contributor

timvandermeij commented Dec 29, 2024

Given that this is part of the public API, and I can imagine that third-party implementations actually handle the current exceptions, should we perhaps classify this as [api-major] instead since it can be seen as a breaking change?

@Snuffleupagus Snuffleupagus changed the title [api-minor] Replace MissingPDFException and UnexpectedResponseException with one exception [api-major] Replace MissingPDFException and UnexpectedResponseException with one exception Dec 29, 2024
@Snuffleupagus
Copy link
Collaborator Author

Snuffleupagus commented Dec 29, 2024

Given that this is part of the public API, and I can imagine that third-party implementations actually handle the current exceptions, should we perhaps classify this as [api-major] instead since it can be seen as a breaking change?

I suppose that's a fair comment; I've updated the commit message and PR title.

It's been a while since we bumped the major version number, and there's also a few things in progress (e.g. canvas tiling) that are significant enough to perhaps warrant a major version bump.
Maybe we should create one last release from the 4 branch, before landing this PR?

@Snuffleupagus Snuffleupagus force-pushed the ResponseException branch 2 times, most recently from 3905adb to b7c4ea9 Compare December 31, 2024 08:44
…ption` with one exception

These old exceptions have a fair amount of overlap given how/where they are being used, which is likely because they were introduced at different points in time, hence we can shorten and simplify the code by replacing them with a more general `ResponseException` instead.

Besides an error message, the new `ResponseException` instances also include:
 - A numeric `status` field containing the server response status, similar to the old `UnexpectedResponseException`.

 - A boolean `missing` field, to allow easily detecting the situations where `MissingPDFException` was previously thrown.
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants