Skip to content

Commit 9e8c288

Browse files
committed
still trying to fix primary resource decoding error
1 parent 86de52f commit 9e8c288

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/JSONAPI/Document/DocumentDecodingError.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +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 .typeMismatch(let type, let context) where Location(context) == .data && type is AbstractResourceObject.Type && context.debugDescription.hasSuffix("but found null instead."):
37-
self = .primaryResourceMissing
3836
case .typeMismatch(let type, let context) where Location(context) == .data && type == UnkeyedDecodingContainer.self && context.debugDescription.hasSuffix("but found null instead."):
3937
self = .primaryResourcesMissing
38+
case .typeMismatch(_, let context) where Location(context) == .data && context.debugDescription.hasSuffix("but found null instead."):
39+
self = .primaryResourceMissing
4040
default:
4141
return nil
4242
}

0 commit comments

Comments
 (0)