All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yahoo.bard.webservice.exception.DataExceptionHandler Maven / Gradle / Ivy

Go to download

Fili web service library provides core capabilities for RESTful aggregation navigation, query planning and metadata

There is a newer version: 1.1.13
Show newest version
// Copyright 2018 Oath Inc.
// Licensed under the terms of the Apache license. Please see LICENSE.md file distributed with this work for terms.
package com.yahoo.bard.webservice.exception;

import com.yahoo.bard.webservice.web.apirequest.DataApiRequest;

import com.fasterxml.jackson.databind.ObjectWriter;

import java.util.Optional;

import javax.ws.rs.container.AsyncResponse;
import javax.ws.rs.container.ContainerRequestContext;

/**
 * Allows a customer to inject custom code for handling Exceptions in Fili's DataServlet.
 * 

* For example, customers may want to return 500's for some custom exceptions, or return * an empty set when dimension rows are not found. */ public interface DataExceptionHandler { /** * Handles any exception generated during response processing. * * @param e The generated throwable (i.e. exception or error) * @param asyncResponse A response that can be used to respond asynchronously * (probably with some sort of appropriate error code) * @param apiRequest A bean containing parsed information about the request, note that * this won't exist if an exception was thrown while constructing the request * @param containerRequestContext HTTP request context * @param writer A tool for serializing JSON */ void handleThrowable( Throwable e, AsyncResponse asyncResponse, Optional apiRequest, ContainerRequestContext containerRequestContext, ObjectWriter writer ); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy