Better x and y validation, report 400 on errors

Report 400 Bad Request on query errors instead of reporting 200 OK
(which can be cached).

Add some additional validation for the 'x' and 'y' parameters, to catch
underflow (test with `x=-10` for example). Also fix a typo in the error
message and include more details (the actual error).