Skip to content

Commit

Permalink
alpha.3
Browse files Browse the repository at this point in the history
  • Loading branch information
f3ath committed Aug 12, 2024
1 parent f46e34c commit 9a7c6af
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- URL Design matching now respects the base URL
- Allo null to be returned by error interceptors

## [8.0.0] - 2024-07-01
### Added
Expand Down
12 changes: 6 additions & 6 deletions lib/src/server/error_converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import 'package:json_api/src/server/response.dart';

/// Creates a middleware that maps server exceptions to HTTP responses.
Middleware errorConverter({
Future<Response> Function(MethodNotAllowed)? onMethodNotAllowed,
Future<Response> Function(UnmatchedTarget)? onUnmatchedTarget,
Future<Response> Function(CollectionNotFound)? onCollectionNotFound,
Future<Response> Function(ResourceNotFound)? onResourceNotFound,
Future<Response> Function(RelationshipNotFound)? onRelationshipNotFound,
Future<Response> Function(Object, StackTrace)? onError,
Future<Response?> Function(MethodNotAllowed)? onMethodNotAllowed,
Future<Response?> Function(UnmatchedTarget)? onUnmatchedTarget,
Future<Response?> Function(CollectionNotFound)? onCollectionNotFound,
Future<Response?> Function(ResourceNotFound)? onResourceNotFound,
Future<Response?> Function(RelationshipNotFound)? onRelationshipNotFound,
Future<Response?> Function(Object, StackTrace)? onError,
}) =>
middleware(
onError: (error, trace, _) async => switch (error) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: json_api
version: 9.0.0-alpha.2
version: 9.0.0-alpha.3
homepage: https://github.com/f3ath/json-api-dart
description: A framework-agnostic implementations of JSON:API Client and Server. Supports JSON:API v1.0 (https://jsonapi.org)
environment:
Expand Down

0 comments on commit 9a7c6af

Please sign in to comment.