@Override
    public void recordFinalResponse(HttpResponseMessage resp) {
        if (resp != null) {
            SessionContext zuulCtx = resp.getContext();

            // Store the status code of final attempt response.
            int originStatusCode = resp.getStatus();
            zuulCtx.put(CommonContextKeys.ORIGIN_STATUS, originStatusCode);

            // Mark origin StatusCategory based on http status code.
            StatusCategory originNfs = ZuulStatusCategory.SUCCESS;
            if (originStatusCode == 503) {
                originNfs = ZuulStatusCategory.FAILURE_ORIGIN_THROTTLED;
            } else if (StatusCategoryUtils.isResponseHttpErrorStatus(originStatusCode)) {
                originNfs = ZuulStatusCategory.FAILURE_ORIGIN;
            }
            StatusCategoryUtils.setOriginStatusCategory(zuulCtx, originNfs);
            // Choose the zuul StatusCategory based on the origin one...
            // ... but only if existing one has not already been set to a non-success value.
            StatusCategoryUtils.storeStatusCategoryIfNotAlreadyFailure(zuulCtx, originNfs);
        }
    }
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