Closed bbprojectnet closed 3 years ago
Hi,
I have primary key as a integer.
When i try this: PATCH /api/quizzes/999999999 i get not found response - it's ok.
PATCH /api/quizzes/999999999
But, when i try this: PATCH /api/quizzes/somestring i get error 500 - "Invalid text representation".
PATCH /api/quizzes/somestring
It happend on PostgreSQL database which is very strict and throw error when we try select * from "quizzes" where "quizzes"."id" = somestring.
select * from "quizzes" where "quizzes"."id" = somestring
Yeah, you don't want the somestring to even hit your database, which is why you should use ID constraints: https://laravel-json-api.readthedocs.io/en/latest/basics/routing/#id-constraints
somestring
Thanks a lot!
Hi,
I have primary key as a integer.
When i try this:
PATCH /api/quizzes/999999999
i get not found response - it's ok.But, when i try this:
PATCH /api/quizzes/somestring
i get error 500 - "Invalid text representation".It happend on PostgreSQL database which is very strict and throw error when we try
select * from "quizzes" where "quizzes"."id" = somestring
.