422 http error code doesn't get returned from server

29 views
Skip to first unread message

deadr...@gmail.com

unread,
Dec 3, 2018, 6:14:22 AM12/3/18
to PHP Desktop
Hello I'm using Laravel with php desktop. I'm trying to use laravel validation with ajax calls but when I submit the validation returns a 200 status code when in fact it should return a 422 status code. I tried to run the laravel app using apache and in fact it works. Does this mean that mongoose does not support 422 error codes?

Czarek Tomczak

unread,
Dec 3, 2018, 6:25:25 AM12/3/18
to PHP Desktop
What phpdesktop version and OS?

What status code do you see in console logs? ("GET/POST xxx" message)

There is a "http_error" callback in Mongoose that maybe we should implement to handle 422 error code:

This is the default "send_http_error" implementation for handling http errors in Mongoose:

deadr...@gmail.com

unread,
Dec 3, 2018, 6:30:25 AM12/3/18
to PHP Desktop
Hi, thanks for the quick reply.
I'm using phpdesktop-chrome-57.0 on windows 10. In console log I have:
POST 200 /client. In fact when the validation fails it should return 422 not 200.

Czarek Tomczak

unread,
Dec 3, 2018, 6:35:50 AM12/3/18
to PHP Desktop
Reported the issue in the tracker:

deadr...@gmail.com

unread,
Dec 4, 2018, 3:22:36 AM12/4/18
to PHP Desktop
Hi,
Will this take too long to implement?
Reply all
Reply to author
Forward
0 new messages