private static HttpStatusException of0(HttpStatus status, @Nullable Throwable cause) {
        final boolean sampled = Flags.verboseExceptionSampler().isSampled(HttpStatusException.class);
        if (sampled || cause != null) {
            return new HttpStatusException(status, sampled, cause);
        }

        final int statusCode = status.code();
        if (statusCode >= 0 && statusCode < 1000) {
            return EXCEPTIONS[statusCode];
        } else {
            return new HttpStatusException(HttpStatus.valueOf(statusCode), false, null);
        }
    }
Returns a new {@link HttpStatusException} instance with the specified {@link HttpStatus} and
{@code cause}.
core/src/main/java/com/linecorp/armeria/server/HttpStatusException.java