Constructs internal server error response

@param message message
@return response
553196
protected Response createInternalServerError(String message) {
    ErrorResponse entity = new ErrorResponse();
    entity.setMessage(message);
    return Response
      .status(Response.Status.INTERNAL_SERVER_ERROR)
      .entity(entity)
      .build();
  }
613320
public void setErrorMessage(String message) {

        m_messageText.setInnerHTML(message);
        addStyleName(formCss().hasError());
        m_hasError = true;
    }
786540
@Nonnull
    public static ApiError parseError(@Nullable String errorBody, int statusCode, @Nullable String message) {
        if (errorBody == null) {
            return new ApiError(null, statusCode, message);
        }

        Moshi moshi = new Moshi.Builder().build();
        JsonAdapter<CompatibilityApiError> oldApiErrorJsonAdapter = moshi.adapter(CompatibilityApiError.class).failOnUnknown();
        try {
             return new ApiError(oldApiErrorJsonAdapter.fromJson(errorBody), statusCode);
        } catch (IOException | JsonDataException exception) {
            // Not old type of error, move on
        }

        JsonAdapter<ApiError> apiErrorJsonAdapter = moshi.adapter(ApiError.class).failOnUnknown();
        try {
            return apiErrorJsonAdapter.fromJson(errorBody);
        } catch (IOException | JsonDataException exception) {
            return new ApiError(null, statusCode, "Unknown Error");
        }
    }
887185
public static void sendError(HttpServletRequest request, HttpServletResponse response, int status, String message) throws IOException {
		if(request.getAttribute(IS_INCLUDED_REQUEST_ATTRIBUTE_NAME) == null) {
			// Not included, sendError directly
			if(message == null) {
				response.sendError(status);
			} else {
				response.sendError(status, message);
			}
		} else {
			// Is included, set attributes so top level tag can perform actual sendError call
			request.setAttribute(STATUS_REQUEST_ATTRIBUTE_NAME, status);
			request.setAttribute(MESSAGE_REQUEST_ATTRIBUTE_NAME, message);
		}
	}
578371
public function respondInternalError($code = ApiResponse::CODE_API_ERROR, $message = null): JsonResponse
    {
        return $this->setStatusCode(IlluminateResponse::HTTP_INTERNAL_SERVER_ERROR)
            ->respondWithError($code, $message);
    }
1211719
public void error(Object message) {
        doLog(Level.ERROR, FQCN, message, null, null);
    }
426593
protected static void reportError(String message, Object... parameters) {
		Throwable cause = null;
		for (int i = 0; cause == null && i < parameters.length; ++i) {
			if (parameters[i] instanceof Throwable) {
				cause = (Throwable) parameters[i];
			}
		}
		final String msg = MessageFormat.format(message, parameters);
		if (cause != null) {
			throw new ParsingException(msg, null, 1, Throwables.getRootCause(cause));
		}
		throw new ParsingException(msg, null, 1);
	}
853951
public static Result internalServerError(String content) {
        return status(Result.INTERNAL_SERVER_ERROR).render(content).as(MimeTypes.TEXT);
    }
874033
protected function create404Response($message = null)
    {
        $response = $this->createResponse();
        $response->setStatusCode(404, $message);

        return $response;
    }
1349845
@ExceptionHandler({MethodArgumentNotValidException.class, ValidationException.class})
    public ResponseEntity<Response> handleValidationException() {
        return new ResponseEntity<>(
                Response.newBuilder()
                        .withMessage(translate(ExceptionCodes.VALIDATION_ERROR))
                        .withHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR.toString())
                        .build(),
                HttpStatus.INTERNAL_SERVER_ERROR
        );
    }
487207
function InternalServerError(message, cause) {
    InternalServerError.super_.call(this, message, StatusCode.INTERNAL_SERVER_ERROR, cause);
}
987870
public void err(String message) throws SAXException {
        if (errorHandler != null) {
            SAXParseException spe = new SAXParseException(message, locator);
            errorHandler.error(spe);
        }
    }
135497
def error_response(
    error_type="Internal server error",
    error_text="",
    status=400,
    participant=None,
    simple=False,
    request_data="",
):
    """"""
    last_exception = sys.exc_info()
    if last_exception[0]:
        db.logger.error(
            "Failure for request: {!r}".format(dict(request.args)),
            exc_info=last_exception,
        )

    data = {"status": "error"}

    if simple:
        data["message"] = error_text
    else:
        data["html"] = (
            error_page(
                error_text=error_text,
                error_type=error_type,
                participant=participant,
                request_data=request_data,
            )
            .get_data()
            .decode("utf-8")
        )
    return Response(dumps(data), status=status, mimetype="application/json")
681278
public static void writeErrorResponse(MessageEvent messageEvent,
                                          HttpResponseStatus status,
                                          String message) {

        // Create the Response object
        HttpResponse response = new DefaultHttpResponse(HTTP_1_1, status);
        response.setHeader(CONTENT_TYPE, "text/plain; charset=UTF-8");
        response.setContent(ChannelBuffers.copiedBuffer("Failure: " + status.toString() + ". "
                                                        + message + "\r\n", CharsetUtil.UTF_8));
        response.setHeader(CONTENT_LENGTH, response.getContent().readableBytes());

        // Write the response to the Netty Channel
        messageEvent.getChannel().write(response);
    }
953060
protected static void error(
            final HttpServletResponse httpServletResponse, final String message, final HttpStatus code) {
        try {
            httpServletResponse.setContentType("text/plain");
            httpServletResponse.setStatus(code.value());
            setNoCache(httpServletResponse);
            try (PrintWriter out = httpServletResponse.getWriter()) {
                out.println("Error while processing request:");
                out.println(message);
            }

            LOGGER.error("Error while processing request: {}", message);
        } catch (IOException ex) {
            throw ExceptionUtils.getRuntimeException(ex);
        }
    }
238778
public static HttpResponse errorJSON(@Nonnull String message, @Nonnull Map<?,?> data) {
        return new JSONObjectResponse(data).error(message);
    }
1137045
protected String formatOutputMessageInternal(final String message) {
        try {
            return EncodingUtils.urlEncode(message);
        } catch (final Exception e) {
            LOGGER.warn("Unable to encode URL " + message, e);
        }
        return message;
    }