Skip to content

Commit

Permalink
chore(core): Make SerializationException implement `BadRequestExcep…
Browse files Browse the repository at this point in the history
…tion`

When thrown on the server, a serialization exception means that the server received bad data from the client.
  • Loading branch information
dnys1 committed Feb 8, 2024
1 parent 297ad51 commit a4a2da4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/celest_core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## 0.2.0-dev

- Make `SerializationException` implement `BadRequestException`

## 0.1.1

- Update README
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sealed class CloudException implements CelestException {}
/// An exception thrown by a Cloud Function when a request contains invalid
/// data or otherwise lead to a recoverable exception.
/// {@endtemplate}
final class BadRequestException implements CloudException {
class BadRequestException implements CloudException {
/// Creates a [BadRequestException] with the given [message].
///
/// {@macro celest_core_exception_bad_request_exception}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:celest_core/celest_core.dart';
/// deserialize a value.
/// {@endtemplate}
final class SerializationException extends FormatException
implements CelestException {
implements BadRequestException, CelestException {
/// Creates a [SerializationException] with the given [message].
///
/// {@macro celest_core_exceptions_serialization_exception}
Expand Down

0 comments on commit a4a2da4

Please sign in to comment.