Services has support for returning an error with an accompanying HTTP status code, but json_server doesn't set the code in its response.

This patch utilizes the $code argument in hook_services_error to return the HTTP status code in event of an error.

Support from Acquia helps fund testing for Drupal Acquia logo