Example usage for org.springframework.web.reactive.function.server ServerResponse statusCode

List of usage examples for org.springframework.web.reactive.function.server ServerResponse statusCode

Introduction

In this page you can find the example usage for org.springframework.web.reactive.function.server ServerResponse statusCode.

Prototype

HttpStatus statusCode();

Source Link

Document

Return the status code of this response.

Usage

From source file:org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler.java

private void logError(ServerRequest request, ServerResponse response, Throwable throwable) {
    if (logger.isDebugEnabled()) {
        logger.debug(request.exchange().getLogPrefix() + formatError(throwable, request));
    }/*from ww  w  .j av a  2  s  .c om*/
    if (response.statusCode().equals(HttpStatus.INTERNAL_SERVER_ERROR)) {
        logger.error(request.exchange().getLogPrefix() + "500 Server Error for " + formatRequest(request),
                throwable);
    }
}