public class

AudioBoxException

extends IOException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.io.IOException
         ↳ fm.audiobox.core.exceptions.AudioBoxException
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Generic AudioBox service exceptions.

This kind of exceptions are typically thrown when a problem with the remote service occurs.

Handled remote errors are:

HTTP Status 402:
Action requires a valid subscription (ForbiddenException).
HTTP Status 403:
Action requires a valid account link to the remote service (ForbiddenException).
HTTP Status 404:
Resource not found or immutable (ResourceNotFoundException).
HTTP Status 409:
Conflict occurred (FileAlreadyUploaded).
HTTP Status 422:
Validation errors (ValidationException).
HTTP Status 503:
Remote service unavailable (overload or system failure)

Summary

Fields
protected static Logger logger
protected int statusCode
Public Constructors
AudioBoxException(String message)
Instantiates a new AudioBoxException.
AudioBoxException(HttpResponse response)
Instantiates a new AudioBoxException exception starting from the response.
Public Methods
int getErrorCode()
Gets status code.
HttpResponse getResponse()
Gets response.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Fields

protected static Logger logger

protected int statusCode

Public Constructors

public AudioBoxException (String message)

Instantiates a new AudioBoxException.

Parameters
message the message

public AudioBoxException (HttpResponse response)

Instantiates a new AudioBoxException exception starting from the response.

Parameters
response the response

Public Methods

public int getErrorCode ()

Gets status code.

Returns
  • the status code

public HttpResponse getResponse ()

Gets response.

Returns
  • the response