Package com.xero.api
Class XeroApiExceptionHandler
- java.lang.Object
-
- com.xero.api.XeroApiExceptionHandler
-
public class XeroApiExceptionHandler extends Object
XeroApiExceptionHandler main method for handling and throwing errors returned by Xero API
-
-
Constructor Summary
Constructors Constructor Description XeroApiExceptionHandler()Init Xero Api Exception Hander
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(com.google.api.client.http.HttpResponseException e)GENERIC ERROR HANDLERvoidexecute(com.google.api.client.http.HttpResponseException e, ApiClient apiClient)LEGACY ERROR HANDLERvoidvalidationError(Integer statusCode, String objectType, Problem error, Exception e)Handle Validation Errors (400)voidvalidationError(Integer statusCode, String objectType, Problem error, Exception e)Handle Validation Errors (400)voidvalidationError(String objectType, Error error, Exception e)Handle Validation Errors (400)voidvalidationError(String objectType, Error error, Exception e)Handle Validation Errors (400)voidvalidationError(String objectType, FeedConnections error, Exception e)Handle Validation Errors (400)voidvalidationError(String objectType, Statements error, Exception e)Handle Validation Errors (400)voidvalidationError(String objectType, Employees employees, Exception e)Handle Validation Errors (400)voidvalidationError(String objectType, LeaveApplications leaveApplications, Exception e)Handle Validation Errors (400)voidvalidationError(String objectType, PayItems payItems, Exception e)Handle Validation Errors (400)voidvalidationError(String objectType, PayrollCalendars payrollCalendars, Exception e)Handle Validation Errors (400)voidvalidationError(String objectType, PayRuns payRuns, Exception e)Handle Validation Errors (400)voidvalidationError(String objectType, SuperFunds superFunds, Exception e)Handle Validation Errors (400)voidvalidationError(String objectType, Timesheets timesheets, Exception e)Handle Validation Errors (400)voidvalidationError(String objectType, String msg, Exception e)Handle Validation Errors (400)
-
-
-
Method Detail
-
validationError
public void validationError(String objectType, Error error, Exception e)
Handle Validation Errors (400)- Parameters:
objectType- String object type being interacted with when the error was returned.error- Error object with details specific to Accounting APIe- Exception object with details about the original exception
-
validationError
public void validationError(String objectType, Error error, Exception e)
Handle Validation Errors (400)- Parameters:
objectType- String object type being interacted with when the error was returned.error- Error object with details specific to Assets APIe- Exception object with details about the original exception
-
validationError
public void validationError(String objectType, Statements error, Exception e)
Handle Validation Errors (400)- Parameters:
objectType- String object type being interacted with when the error was returned.error- Statements object with details specific to Bank Feeds APIe- Exception object with details about the original exception
-
validationError
public void validationError(String objectType, FeedConnections error, Exception e)
Handle Validation Errors (400)- Parameters:
objectType- String object type being interacted with when the error was returned.error- FeedConnections object with details specific to Bank Feeds APIe- Exception object with details about the original exception
-
validationError
public void validationError(Integer statusCode, String objectType, Problem error, Exception e)
Handle Validation Errors (400)- Parameters:
statusCode- Integer the server status code returned.objectType- String object type being interacted with when the error was returned.error- Problem object with details specific to UK Payroll APIe- Exception object with details about the original exception
-
validationError
public void validationError(Integer statusCode, String objectType, Problem error, Exception e)
Handle Validation Errors (400)- Parameters:
statusCode- Integer the server status code returned.objectType- String object type being interacted with when the error was returned.error- Problem object with details specific to NZ Payroll APIe- Exception object with details about the original exception
-
validationError
public void validationError(String objectType, Employees employees, Exception e)
Handle Validation Errors (400)- Parameters:
objectType- String object type being interacted with when the error was returned.employees- Employees object with details specific to AU Payroll APIe- Exception object with details about the original exception
-
validationError
public void validationError(String objectType, LeaveApplications leaveApplications, Exception e)
Handle Validation Errors (400)- Parameters:
objectType- String object type being interacted with when the error was returned.leaveApplications- LeaveApplications object with details specific to AU Payroll APIe- Exception object with details about the original exception
-
validationError
public void validationError(String objectType, PayItems payItems, Exception e)
Handle Validation Errors (400)- Parameters:
objectType- String object type being interacted with when the error was returned.payItems- PayItems object with details specific to AU Payroll APIe- Exception object with details about the original exception
-
validationError
public void validationError(String objectType, PayRuns payRuns, Exception e)
Handle Validation Errors (400)- Parameters:
objectType- String object type being interacted with when the error was returned.payRuns- PayRuns object with details specific to AU Payroll APIe- Exception object with details about the original exception
-
validationError
public void validationError(String objectType, PayrollCalendars payrollCalendars, Exception e)
Handle Validation Errors (400)- Parameters:
objectType- String object type being interacted with when the error was returned.payrollCalendars- PayrollCalendars object with details specific to AU Payroll APIe- Exception object with details about the original exception
-
validationError
public void validationError(String objectType, SuperFunds superFunds, Exception e)
Handle Validation Errors (400)- Parameters:
objectType- String object type being interacted with when the error was returned.superFunds- SuperFunds object with details specific to AU Payroll APIe- Exception object with details about the original exception
-
validationError
public void validationError(String objectType, Timesheets timesheets, Exception e)
Handle Validation Errors (400)- Parameters:
objectType- String object type being interacted with when the error was returned.timesheets- Timesheets object with details specific to AU Payroll APIe- Exception object with details about the original exception
-
validationError
public void validationError(String objectType, String msg, Exception e)
Handle Validation Errors (400)- Parameters:
objectType- String object type being interacted with when the error was returned.msg- Sting with details specific to Accounting APIe- Exception object with details about the original exception
-
execute
public void execute(com.google.api.client.http.HttpResponseException e)
GENERIC ERROR HANDLER- Parameters:
e- HttpResponseException object with details about the original exception
-
execute
public void execute(com.google.api.client.http.HttpResponseException e, ApiClient apiClient) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOExceptionLEGACY ERROR HANDLER- Parameters:
e- HttpResponseException object with details about the original exceptionapiClient- ApiClient class for use in deserializing http response- Throws:
com.fasterxml.jackson.core.JsonParseException- for parsing errorscom.fasterxml.jackson.databind.JsonMappingException- for mapping errorsIOException- for failed or interrupted I/O operations
-
-