Skip to content

Commit 6f8e133

Browse files
committed
Fix decoding error support for newer MacOS Swift versions
1 parent 457ac3d commit 6f8e133

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Sources/JSONAPI/Document/DocumentDecodingError.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ public enum DocumentDecodingError: Swift.Error, Equatable {
3333
self = .primaryResourceMissing
3434
case .valueNotFound(let type, let context) where Location(context) == .data && type == UnkeyedDecodingContainer.self:
3535
self = .primaryResourcesMissing
36+
case .valueNotFound(let type, let context) where Location(context) == .data && type is _ArrayType.Type && context.debugDescription.hasSuffix("found null value instead"):
37+
self = .primaryResourcesMissing
38+
case .valueNotFound(_, let context) where Location(context) == .data && context.debugDescription.hasSuffix("found null value instead"):
39+
self = .primaryResourceMissing
3640
case .typeMismatch(let type, let context) where Location(context) == .data && type is _ArrayType.Type && context.debugDescription.hasSuffix("but found null instead."):
3741
self = .primaryResourcesMissing
3842
case .typeMismatch(_, let context) where Location(context) == .data && context.debugDescription.hasSuffix("but found null instead."):

0 commit comments

Comments
 (0)