Showing more detailed error messages to user
You might want to check services.alter.api.php

As described in this post

&lt;?php
/**
 * Allows alteration of error data before the status code or message are returned.
 *
 * @param array $error_alter_array
 *   An associative array with the following keys:
 *     - 'code': the HTTP status code.
 *     - 'header_message': the message returned as part of the error response
 *       (for instance, "404 Not found").
 *     - 'body_data': data that was passed to the thrown exception.
 * @param array $controller
 *   The current controller definition.
 * @param array $arguments
 *   Arguments passed to the current controller.
 *
 * @see RESTServer-&gt;handleException()
*/
function hook_rest_server_execute_errors_alter(&amp;$error_alter_array, $controller, $arguments) {

}