Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Error pointer always refers to the attributes #413

Closed
Labels
@jkostrzewski

Description

If I do a POST request with data containing a relationship:

{
 "data": {
 "type": "comment",
 "attributes": {
 "text": "comment text"
 },
 "relationships": {
 "author": {
 "data": {
 "id": "1 (invalid id)",
 "type": "author"
 }
 }
 }
 }
}

I got the following response:

{
 "errors": [{
 "status": "400",
 "source": {"pointer": "/data/attributes/author"}, 
 "detail": "Error message"
 }]
}

But would rather expect the following response:

{
 "errors": [{
 "status": "400",
 "source": {"pointer": "/data/relationships/author"}, 
 "detail": "Error message"
 }]
}

So the two responses are different when it comes to source/pointer.
Which version is the proper one? According to the specs the pointer should point to the associated entity in the request document.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /