rest-vir - v2.2.0
    Preparing search index...

    Type Alias EndpointMethodImplementationErrorOutput

    EndpointMethodImplementationErrorOutput: RequireExactlyOne<
        {
            [Status in ErrorHttpStatus]: {
                headers?: DefaultOutgoingResponseHeadersType;
                responseData: DefaultErrorResponseType;
            }
        },
    >

    A generic type just for error responses.

    function unauthorized(): EndpointMethodImplementationErrorOutput<
    typeof myEndpoint,
    HttpMethod.Get
    > {
    return {[HttpStatus.Unauthorized]: {responseData: undefined}};
    }