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

org.yestech.episodic.EpisodicException Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package org.yestech.episodic;

import org.yestech.episodic.objectmodel.ErrorResponse;

/**
 * Thrown when an Error Response is received from episodic.
 * 

* The following is a list of error codes that can be returned from Episodic API methods.
* 1 - The API Key wasn't provided or is invalid or the signature is invalid.
* 2 - The requested report could not be found. Either the report token is invalid or the report has expired and is no longer available.
* 3 - The request failed to specifiy one or more of the required parameters to an API method.
* 4 - The value specified for a parameter is not valid.
* 5 - The request is no longer valid because the expires parameter specifies a time more than 30 seconds old.
* 6 - The specified object (i.e. show or episode) could not be found.
* 7 - API access for the user is disabled.
* 500 - There was an unexpected error on the server.
* * @author A.J. Wright */ public class EpisodicException extends RuntimeException { protected int code; public EpisodicException(ErrorResponse er) { this(er.getCode(), er.getMessage()); } public EpisodicException(int code, String message) { super(message); this.code = code; } public int getCode() { return code; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy