## Error Handling The Portal SOAP API uses result codes and exception arrays to communicate operation status and errors. ## Response Structure Every operation response includes: | Field | Type | Description | | --- | --- | --- | | `{Operation}Result` | int | Result code (0 = success, non-zero = error) | | `exception` | ArrayOfString | Array of error messages | | `gst` | int | GST amount in cents | | `chargeExgst` | int | Charge excluding GST in cents | | `chargeAccount` | string | Account charged | | `sourceDateTime` | string | Timestamp of the response | ## Result Codes | Code | Description | | --- | --- | | 0 | Success - operation completed successfully | | 1 | General error - check exception array for details | | 2 | Authentication error - invalid session or account | | 3 | Validation error - invalid input parameters | | 4 | Not found - requested resource does not exist | | 5 | Permission denied - insufficient access rights | ## Common Error Messages ### Authentication Errors | Error | Cause | Solution | | --- | --- | --- | | "Invalid session" | Session has expired or is invalid | Re-authenticate to obtain a new session ID | | "Account not found" | Account ID is incorrect | Verify your account ID | | "Access denied" | Account lacks required permissions | Contact support to verify account permissions | ### Validation Errors | Error | Cause | Solution | | --- | --- | --- | | "Invalid date format" | Date not in expected format | Use YYYY-MM-DD format for dates | | "Required field missing" | Mandatory parameter not provided | Check WSDL for required fields | | "Invalid subscription ID" | Subscription does not exist | Verify subscription ID exists | ### Resource Errors | Error | Cause | Solution | | --- | --- | --- | | "Title not found" | Volume/folio does not exist | Verify the title reference | | "Application not found" | Application ID invalid | Use a valid application ID | | "Certificate unavailable" | Certificate cannot be ordered | Check certificate availability | ## SOAP Fault Handling In addition to application-level errors, the service may return SOAP faults for transport or server errors: ```xml soap:Server Internal server error Service temporarily unavailable ``` ### Recommended Error Handling 1. **Check Result Code** - Always check the `{Operation}Result` field first 2. **Parse Exceptions** - If result is non-zero, iterate through the `exception` array 3. **Handle SOAP Faults** - Catch and handle SOAP fault exceptions in your client 4. **Implement Retry Logic** - For transient errors, implement exponential backoff ## Example Error Response ```xml 2 Invalid session ID Please re-authenticate 0 0 2024-01-15T10:30:00Z ``` ## Support If you encounter persistent errors or need assistance troubleshooting, contact: [data.services@servictoria.com.au](mailto:data.services@servictoria.com.au) Include in your support request: - Your account ID - The operation being called - The complete error message - Timestamp of the error - Your customer reference (if used)