public static Response errorResponse(String message) {
    return Response.serverError().entity(Collections.singletonMap("message", message)).build();
  }
Constructs a consistent format for error responses.

@param message the error message to report.
@return        the {@link Response} containing the error message.
samza-rest/src/main/java/org/apache/samza/rest/resources/Responses.java