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

Returning values should not have any brackets #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iggyzuk
Copy link

@iggyzuk iggyzuk commented Mar 17, 2024

When you send a post request to create a new spell you get this error:

2024-03-17T00:33:03.167232Z ERROR spellbook::handler: no column found for name: id
2024-03-17T00:33:03.167283Z ERROR tower_http::trace::on_failure: response failed classification=Status code: 500 Internal Server Error latency=142 ms

This is because you don't need the brackets on the RETURNING clause.

Postgres docs has some examples on this
https://www.postgresql.org/docs/current/sql-update.html

The database is still modified, just the returning values break it and return a 500.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant