Enhance MySubaru API integration with improved error handling and new utility functions
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 25s
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 25s
- Refactor Response struct's parse method to return detailed error messages based on API error codes. - Introduce UnixTime type for handling Unix timestamps in JSON marshaling and unmarshaling. - Add email masking utility function to obfuscate email addresses for privacy. - Implement containsValueInStruct function to check for substring presence in struct fields. - Create comprehensive unit tests for UnixTime, email masking, and struct value checking. - Update vehicle service request method documentation for clarity.
This commit is contained in:
@ -792,6 +792,7 @@ func (v *Vehicle) GetFeaturesList() {
|
||||
}
|
||||
|
||||
// executeServiceRequest
|
||||
// Executes a service request to the Subaru API and handles the response.
|
||||
func (v *Vehicle) executeServiceRequest(params map[string]string, reqUrl, pollingUrl string, ch chan string, attempt int) error {
|
||||
var maxAttempts = 15
|
||||
|
||||
|
Reference in New Issue
Block a user