@Override
    public void recordFinalError(HttpRequestMessage requestMsg, Throwable throwable) {
        if (throwable == null) {
            return;
        }

        SessionContext zuulCtx = requestMsg.getContext();

        // Choose StatusCategory based on the ErrorType.
        ErrorType et = requestAttemptFactory.mapNettyToOutboundErrorType(throwable);
        StatusCategory nfs = et.getStatusCategory();
        StatusCategoryUtils.setStatusCategory(zuulCtx, nfs);
        StatusCategoryUtils.setOriginStatusCategory(zuulCtx, nfs);

        zuulCtx.setError(throwable);
    }
Netty Origin basic implementation that can be used for most apps, with the more complex methods having no-op
implementations.

Author: Arthur Gonigberg
Date: December 01, 2017
zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java