Repository: micronaut-projects/micronaut-core
File: http-client-core/src/main/java/io/micronaut/http/client/exceptions/HttpClientResponseException.java (Java)

Code before:
        this.errorDecoder = errorDecoder;
        this.response = response;
        initResponse(response);
    }

    @Override
    public String getMessage() {
        Optional<Argument<?>> errorType = Optional.ofNullable(getErrorType(response));
        if (errorType.isPresent()) {
            return getResponse().getBody(errorType.get()).flatMap(errorDecoder::getMessage).orElse(super.getMessage());
        } else {
            return super.getMessage();
        }
    }

    /**
     * @return The {@link HttpResponse}
     */
    @Override
    public HttpResponse<?> getResponse() {
        return response;
    }

    /**
     * @return The {@link io.micronaut.http.HttpStatus} returned
     * @deprecated To support custom status codes. Use {@link #code()} instead of {@link #getStatus()} and {@link HttpStatus#getCode()}  and {@link #reason()} instead of {@link #getStatus()} and {@link HttpStatus#getReason()}
     */
    @Deprecated(since = "4.7.2")
    public HttpStatus getStatus() {
        return getResponse().getStatus();
    }

    /**
     * @return The response status code
     */
    public int code() {
        return getResponse().code();
    }

    /**
     * @return The HTTP status reason phrase
     */
    public String reason() {
        return getResponse().reason();
    }

    @SuppressWarnings("MagicNumber")
    private void initResponse(HttpResponse<?> response) {
        Argument<?> errorType = getErrorType(response);
        if (errorType != null) {
            response.getBody(errorType);

Review comment (suggestion):
```suggestion
     * To support custom status codes. Use {@link #code()} instead of {@link #getStatus()} and {@link HttpStatus#getCode()}  and {@link #reason()} instead of {@link #getStatus()} and {@link HttpStatus#getReason()}.
```

Code after:
        this.errorDecoder = errorDecoder;
        this.response = response;
        initResponse(response);
    }

    @Override
    public String getMessage() {
        Optional<Argument<?>> errorType = Optional.ofNullable(getErrorType(response));
        if (errorType.isPresent()) {
            return getResponse().getBody(errorType.get()).flatMap(errorDecoder::getMessage).orElse(super.getMessage());
        } else {
            return super.getMessage();
        }
    }

    /**
     * @return The {@link HttpResponse}
     */
    @Override
    public HttpResponse<?> getResponse() {
        return response;
    }

    /**
     * @return The {@link io.micronaut.http.HttpStatus} returned
     * To support custom status codes. Use {@link #code()} instead of {@link #getStatus()} and {@link HttpStatus#getCode()}  and {@link #reason()} instead of {@link #getStatus()} and {@link HttpStatus#getReason()}.
     */
    public HttpStatus getStatus() {
        return getResponse().getStatus();
    }

    /**
     * @return The response status code
     */
    public int code() {
        return getResponse().code();
    }

    /**
     * @return The HTTP status reason phrase
     */
    public String reason() {
        return getResponse().reason();
    }

    @SuppressWarnings("MagicNumber")
    private void initResponse(HttpResponse<?> response) {
        Argument<?> errorType = getErrorType(response);
        if (errorType != null) {
            response.getBody(errorType);
        } else {