Package com.xero.api
Class XeroApiExceptionHandler
java.lang.Object
com.xero.api.XeroApiExceptionHandler
XeroApiExceptionHandler main method for handling and throwing errors returned by Xero API
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(com.google.api.client.http.HttpResponseException e) GENERIC ERROR HANDLERvoidLEGACY 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)
-
Constructor Details
-
XeroApiExceptionHandler
public XeroApiExceptionHandler()Init Xero Api Exception Hander
-
-
Method Details
-
validationError
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
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
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
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
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
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
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
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
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
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
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
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
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
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, IOException LEGACY 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
-