Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DELETE <pub>/relations API returns 400 when it should return 200 #871

Open
gabestein opened this issue Dec 22, 2024 · 0 comments · May be fixed by #928
Open

DELETE <pub>/relations API returns 400 when it should return 200 #871

gabestein opened this issue Dec 22, 2024 · 0 comments · May be fixed by #928
Assignees
Labels
1-day bug Something isn't working

Comments

@gabestein
Copy link
Member

gabestein commented Dec 22, 2024

What went wrong, step-by-step?

  1. Delete a relation from a pub using the API
  2. It will return a 400 with the error: Error: No fields found for slugs:
  3. But it will have successfully deleted the relation

e.g.:

DELETE https://app.pubpub.org/api/v0/c/arcadia-dev/site/pubs/c7e02fdc-e3bf-4422-a5f7-8e112e3b3e8d/relations
Authorization: Bearer <token>
Prefer: "return=representation"
Accept: "*/*"
Content-Type: "application/json",

{
  "arcadia-dev:pub-content-types": [ "0a8b81c9-e025-4e08-94aa-f669630b62f0" ]
}

What did you expect to happen?

Returns a 200

What URL can we use to see the issue?

What browser/operating system were you using?

Optional

Have any screenshots? (Attach them by dragging the image here)

Who reported this? (If not you)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-day bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants