My Business
3.7K members online now
3.7K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

which client library allows to have detailed error repsonse

[ Edited ]
Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi,

 

As far as I know, C# client library can not provide a detailed error response. It only gives us a generic response as shown below:

Request contains an invalid argument. [400]
Errors [
Message[Request contains an invalid argument.] Location[ - ] Reason[badRequest] Domain[global]
]

 

Is there any client library that will provide us the detailed error response as I can see in the OAuth Playground mentioned below. Will this be possible?

 

 

{
 
"error": {
   
"status": "INVALID_ARGUMENT",
   
"message": "Request contains an invalid argument.",
   
"code": 400,
   
"details": [
     
{
       
"errorDetails": [
         
{
           
"field": "location.primary_phone",
           
"message": "Invalid phone number, should look like 02 1234 5678, but was",
           
"code": 3,
           
"value": "432836376"
         
},
         
{
           
"field": "location.address.administrative_area",
           
"message": "address.administrative_area is invalid",
           
"code": 3,
           
"value": "Aiello del Friuli"
         
}
       
],
       
"@type": "type.googleapis.com/google.mybusiness.v2.ValidationError"
     
}
   
]
 
}
}


 

Thanks and Regards,

Bharath

 

2 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author anumula b
November 2016

Re: which client library allows to have detailed error repsonse

Google Employee
# 2
Google Employee

Hi @anumula b,

 

As far as I’m concerned, our official Java client library supports enabling more detailed error messages in responses by adding an additional header to requests. You can find a Java sample code snippet in this thread.

 

The Google API Client Library for Python supports Detailed Error Responses via the Google My Business API. You can find a Python code snippet in this thread.

 

The Google API Client Library for Ruby supports Detailed Error Responses via the Google My Business API. You can find a Ruby code snippet in this Accepted Solution.

 

Thanks,

Terry

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author anumula b
November 2016

Re: which client library allows to have detailed error repsonse

Google Employee
# 2
Google Employee

Hi @anumula b,

 

As far as I’m concerned, our official Java client library supports enabling more detailed error messages in responses by adding an additional header to requests. You can find a Java sample code snippet in this thread.

 

The Google API Client Library for Python supports Detailed Error Responses via the Google My Business API. You can find a Python code snippet in this thread.

 

The Google API Client Library for Ruby supports Detailed Error Responses via the Google My Business API. You can find a Ruby code snippet in this Accepted Solution.

 

Thanks,

Terry

which client library allows to have detailed error repsonse

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

Hi @Terry W,

 

Thanks for the detailed solution.

 

Can I kindly know when can we expect the detailed error response in C# client library as well? Any plans on it?

 

Thanks and Regards,

Bharath

Re: which client library allows to have detailed error repsonse

Google Employee
# 4
Google Employee

Hi @anumula b,

 

The display of detailed error messages is not currently support by the C# client library and we don’t have a timeline for when this functionality will be included. We’ll announce new functionalities of the API as they become available on both this board and the Google Developers site. For the time being, please continue to use the OAuth 2.0 Playground for troubleshooting errors with detailed error messages when sending requests with data via the Google My Business API.

 

Thanks,

Terry

which client library allows to have detailed error repsonse

[ Edited ]
Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hi @Terry W, March 2018, has the support been added in C# client library yet? Not sure how much work is it to add a header though!! oAuth2.0 playground is not feasible for troubleshooting on production. I hope its been solved already

Re: which client library allows to have detailed error repsonse

[ Edited ]
Google Employee
# 6
Google Employee

Hi @Ali B,

 

We totally understand your input. We'll definitely keep you up to date when there are updates. 

 

Also we’ll announce new functionalities of the Google My Business API as they become available on both this board and the Google Developers site

 

Thanks,

The Google My Business API team