Debuging response outputs
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
This commit is contained in:
@ -242,6 +242,7 @@ func (c *Client) execute(requestUrl string, method string, params map[string]str
|
||||
if err != nil {
|
||||
c.logger.Error("error while getting body", "error", err.Error())
|
||||
}
|
||||
c.logger.Debug("parsed http request output", "data", string(resBytes))
|
||||
|
||||
if r, ok := c.parseResponse(resBytes); ok {
|
||||
// c.logger.Debug("parsed http request output", "data", r.Data)
|
||||
@ -251,7 +252,7 @@ func (c *Client) execute(requestUrl string, method string, params map[string]str
|
||||
var sr ServiceRequest
|
||||
err := json.Unmarshal(r.Data, &sr)
|
||||
if err != nil {
|
||||
c.logger.Error("error while parsing json", "request", "HTTP POLLING", "error", err.Error())
|
||||
c.logger.Error("error while parsing json", "request", "remoteServiceStatus", "error", err.Error())
|
||||
}
|
||||
|
||||
if pollingUrl != "" {
|
||||
|
@ -281,6 +281,7 @@ type ServiceRequest struct {
|
||||
// "dataName":"errorResponse"
|
||||
// {"success":false,"errorCode":"404-soa-unableToParseResponseBody","dataName":"errorResponse","data":{"errorLabel":"404-soa-unableToParseResponseBody","errorDescription":null}}
|
||||
// {"success":false,"errorCode":"vehicleNotInAccount","dataName":null,"data":null}
|
||||
// {"httpCode":500,"errorCode":"error","errorMessage":"java.lang.NullPointerException - null"}
|
||||
// {"success":false,"errorCode":"InvalidCredentials","dataName":"remoteServiceStatus","data":{"serviceRequestId":null,"success":false,"cancelled":false,"remoteServiceType":null,"remoteServiceState":null,"subState":null,"errorCode":null,"result":null,"updateTime":null,"vin":null,"errorDescription":"The credentials supplied are invalid, tries left 2"}}
|
||||
type ErrorResponse struct {
|
||||
ErrorLabel string `json:"errorLabel"` // "404-soa-unableToParseResponseBody"
|
||||
|
@ -587,7 +587,7 @@ func (v *Vehicle) GetVehicleStatus() {
|
||||
v.selectVehicle()
|
||||
reqURL := MOBILE_API_VERSION + urlToGen(apiURLs["API_VEHICLE_STATUS"], v.getAPIGen())
|
||||
resp := v.client.execute(reqURL, GET, map[string]string{}, "", false)
|
||||
v.client.logger.Info("http request output", "request", "GetVehicleStatus", "body", resp)
|
||||
// v.client.logger.Info("http request output", "request", "GetVehicleStatus", "body", resp)
|
||||
|
||||
if r, ok := v.client.parseResponse(resp); ok {
|
||||
var vs VehicleStatus
|
||||
@ -639,7 +639,7 @@ func (v *Vehicle) GetVehicleCondition() {
|
||||
v.selectVehicle()
|
||||
reqURL := MOBILE_API_VERSION + urlToGen(apiURLs["API_CONDITION"], v.getAPIGen())
|
||||
resp := v.client.execute(reqURL, GET, map[string]string{}, "", false)
|
||||
v.client.logger.Info("http request output", "request", "GetVehicleCondition", "body", resp)
|
||||
// v.client.logger.Info("http request output", "request", "GetVehicleCondition", "body", resp)
|
||||
|
||||
if r, ok := v.client.parseResponse(resp); ok {
|
||||
var sr ServiceRequest
|
||||
|
Reference in New Issue
Block a user