Currently if you fail to include an object due to a bad spec, you'll see errors like this.
For example an Include error is described as this
Include 4 failed to parse
`Could not have been Include Type 1 because:
found JSON:API type "person" but expected "dog"`
`Could not have been Include Type 2 because:
found JSON:API type "person" but expected "pet"`
`Could not have been Include Type 3 because:
found JSON:API type "paragraph" but expected "media"`
Could not have been Include Type 4 because:
'nickname' attribute is not nullable but null was found.
And a primary error as this
Primary Resource 1 failed to parse because 'name' attribute is not nullable but null was found.
I found out that the specific Include error is detailed in DocumentDecodingError is detailed in the idx but not really shown in the description.
I wonder if it's a better way to print only:
Include Type 4 failed because: 'nickname' attribute is not nullable but null was found.
But maybe that's because I don't know if there are other use cases.
Currently if you fail to include an object due to a bad spec, you'll see errors like this.
For example an Include error is described as this
And a primary error as this
I found out that the specific Include error is detailed in DocumentDecodingError is detailed in the idx but not really shown in the description.
I wonder if it's a better way to print only:
Include Type 4 failed because: 'nickname' attribute is not nullable but null was found.
But maybe that's because I don't know if there are other use cases.