BUG: Api / Reboot Task returns status 500 for a non existent device id

Hi, FYI, I am doing a lot of testing (in bound and out of bound) for an interface I am building to GenieACS.

When I send a reboot request with a deliberately incorrect deviceID, the server returns a 500 code with a response string of “No such device”.

Expected value would be either 400 (Bad Request) or 422 (Unprocessable Entry). Some folks use a 404 (Not Found) on a POST request but while not strictly correct, it would be ok since this is an action and not a resource create request. All are better than 500 (which normally indicates a server barf vs a client barf (4xx codes). I am sure there will be a few opinions on wich 4xx code to use so will leave that to you.

Bug is non-blocking since work around is of course to translate the 500 to a 422 , 404 or 400 when the message contains “No such device”(my choice).