/** * @return An instance with {@link #shouldHandleResponse} set to false. */ public static ApiExceptionHandlerListenerResult ignoreResponse() { return new ApiExceptionHandlerListenerResult(false, null, null, null); } }
/** * @param errors * The {@link ApiError}s that should represent the exception. This should not be null or empty. * * @return An instance with {@link #shouldHandleResponse} set to true and {@link #errors} set to a copy of the given * set of errors. */ public static ApiExceptionHandlerListenerResult handleResponse(SortedApiErrorSet errors) { return new ApiExceptionHandlerListenerResult(true, errors, null, null); }
/** * @param errors * The {@link ApiError}s that should represent the exception. This should not be null or empty. * @param extraDetailsForLogging * Any extra key/value pairs that should be logged when Backstopper logs the exception/error. * * @return An instance with {@link #shouldHandleResponse} set to true, {@link #errors} set to a copy of the given * set of errors, and {@link #extraDetailsForLogging} set to a copy of the given list of logging data. */ public static ApiExceptionHandlerListenerResult handleResponse(SortedApiErrorSet errors, List<Pair<String, String>> extraDetailsForLogging) { return new ApiExceptionHandlerListenerResult(true, errors, extraDetailsForLogging, null); }
/** * @param errors * The {@link ApiError}s that should represent the exception. This should not be null or empty. * @param extraDetailsForLogging * Any extra key/value pairs that should be logged when Backstopper logs the exception/error. * @param extraResponseHeaders * Any extra response headers that the framework should include in the response to the caller. * * @return An instance with {@link #shouldHandleResponse} set to true, {@link #errors} set to a copy of the given * set of errors, and {@link #extraDetailsForLogging} set to a copy of the given list of logging data. */ public static ApiExceptionHandlerListenerResult handleResponse( SortedApiErrorSet errors, List<Pair<String, String>> extraDetailsForLogging, List<Pair<String, List<String>>> extraResponseHeaders ) { return new ApiExceptionHandlerListenerResult(true, errors, extraDetailsForLogging, extraResponseHeaders); }