Skip to content

GMB API error model does not match GoogleJsonError model #1974

@ghost

Description

The error response model of the GMB APIs (https://developers.google.com/my-business/ref_overview) currently looks like this:

{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [{
                "@type": "type.googleapis.com/google.mybusiness.v4.ValidationError",
                "errorDetails": [{
                        "code": 3,
                        "field": "regular_hours.periods.close_time",
                        "message": "Time field must follow hh:mm format.",
                        "value": "25:00"
                    }
                ]
            }
        ]
    }
}

The subclass Details of the GoogleJsonError class, however, does not feature an errorDetails property.
Once the JsonParser is reached, we thus reach customizeParser.handleUnrecognizedKey(destination, key); for the errorDetails field.

Metadata

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions