Skip to content

Commit 6ccd8fd

Browse files
committed
hopefully catch a stupid handling of null in linux decoding of json.
1 parent 9d0c320 commit 6ccd8fd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Sources/JSONAPI/Document/DocumentDecodingError.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ 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 .typeMismatch(_, let context) where context.debugDescription.hasSuffix("but found null instead."):
37+
self = .primaryResourcesMissing
3638
default:
3739
return nil
3840
}

0 commit comments

Comments
 (0)