Skip to content

Commit 9a7c6af

Browse files
committed
alpha.3
1 parent f46e34c commit 9a7c6af

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
### Changed
99
- URL Design matching now respects the base URL
10+
- Allo null to be returned by error interceptors
1011

1112
## [8.0.0] - 2024-07-01
1213
### Added

lib/src/server/error_converter.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import 'package:json_api/src/server/response.dart';
1212

1313
/// Creates a middleware that maps server exceptions to HTTP responses.
1414
Middleware errorConverter({
15-
Future<Response> Function(MethodNotAllowed)? onMethodNotAllowed,
16-
Future<Response> Function(UnmatchedTarget)? onUnmatchedTarget,
17-
Future<Response> Function(CollectionNotFound)? onCollectionNotFound,
18-
Future<Response> Function(ResourceNotFound)? onResourceNotFound,
19-
Future<Response> Function(RelationshipNotFound)? onRelationshipNotFound,
20-
Future<Response> Function(Object, StackTrace)? onError,
15+
Future<Response?> Function(MethodNotAllowed)? onMethodNotAllowed,
16+
Future<Response?> Function(UnmatchedTarget)? onUnmatchedTarget,
17+
Future<Response?> Function(CollectionNotFound)? onCollectionNotFound,
18+
Future<Response?> Function(ResourceNotFound)? onResourceNotFound,
19+
Future<Response?> Function(RelationshipNotFound)? onRelationshipNotFound,
20+
Future<Response?> Function(Object, StackTrace)? onError,
2121
}) =>
2222
middleware(
2323
onError: (error, trace, _) async => switch (error) {

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: json_api
2-
version: 9.0.0-alpha.2
2+
version: 9.0.0-alpha.3
33
homepage: https://github.com/f3ath/json-api-dart
44
description: A framework-agnostic implementations of JSON:API Client and Server. Supports JSON:API v1.0 (https://jsonapi.org)
55
environment:

0 commit comments

Comments
 (0)