Skip to content

feat: Base classes for server and client http exceptions. #35

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 16, 2023

Conversation

Johannestegner
Copy link
Member

Type of change

  • New feature
  • Bug fix
  • Security patch
  • Documentation update

Description

Adds two new base classes for Client and Server HTTP errors.
Will allow easier checks on reporting and similar:

if ($e instanceof HttpClientException) { 
  ...
}

// Rather than
if (($e instanceof HttpException) && ($e->getStatus() > 399 && $e->getStatus() < 500))  {
  ...
}

…raint and set it to 8.1).

Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
…in test.

Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
@Johannestegner Johannestegner force-pushed the feature/http-base-classes branch from 96674b3 to 2a7f548 Compare October 16, 2023 08:20
@Johannestegner Johannestegner merged commit 51904d2 into master Oct 16, 2023
@Johannestegner Johannestegner deleted the feature/http-base-classes branch October 16, 2023 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant