Refactor some functions

This commit is contained in:
2025-07-02 12:06:23 +03:00
parent 21a928bf70
commit 0744d16401
5 changed files with 771 additions and 588 deletions

View File

@ -102,6 +102,8 @@ var API_ERRORS = map[string]string{
"passwordWarning": "ERROR_PASSWORD_WARNING",
"accountLocked": "ERROR_ACCOUNT_LOCKED",
"noVehiclesOnAccount": "ERROR_NO_VEHICLES",
"noVehiclesAvailable": "ERROR_NO_VEHICLE_AVAILABLE",
"VEHICLESETUPERROR": "ERROR_VEHICLE_SETUP_ERROR", // Vehicle Select
"accountNotFound": "ERROR_NO_ACCOUNT",
"tooManyAttempts": "ERROR_TOO_MANY_ATTEMPTS",
"vehicleNotInAccount": "ERROR_VEHICLE_NOT_IN_ACCOUNT",
@ -112,6 +114,10 @@ var API_ERRORS = map[string]string{
"SXM40017": "ERROR_G1_PIN_LOCKED",
}
var APP_ERRORS = map[string]string{
"SUBSCRIBTION_REQUIRED": "active STARLINK Security Plus subscription required",
}
// TODO: Get back and add error wrapper
// var apiErrors = map[string]string{
// "ERROR_SOA_403": "403-soa-unableToParseResponseBody", // G2 Error Codes