Skip to content

Commit

Permalink
feat: Add support for 426: Upgrade Required
Browse files Browse the repository at this point in the history
  • Loading branch information
willlockwood committed Jul 22, 2024
1 parent 7354000 commit 1b9fd41
Show file tree
Hide file tree
Showing 4 changed files with 284 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/network_response.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class NetworkResponse<R> with _$NetworkResponse<R> {
required R response,
}) = _UnprocessableEntity;

/// 426 - for responses when access to a resource requires a client upgrade.
const factory NetworkResponse.upgradeRequired(DioException error) = _UpgradeRequired;

/// 500 - for responses where the service had an error while processing
/// the request.
const factory NetworkResponse.serverError(DioException error) = _ServerError;
Expand Down
Loading

0 comments on commit 1b9fd41

Please sign in to comment.