Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

mg_rpc_send_errorf() always results in code 500

Hi everyone,

When our users send HTTP POST with incomplete information, our rpc handler sends:

mg_rpc_send_errorf(ri, 400, "Bad Request");

Result:

But as you can see above, the message Bad Request shows up OK, but with the wrong error code. It is always 500.

We always get 500 no matter what code we put in as the second argument to mg_rpc_send_errorf(). Any help would be greatly appreciated!
Andrew

Comments

Sign In or Register to comment.