ateliervitali / google-api-objectivec-client

Automatically exported from code.google.com/p/google-api-objectivec-client
0 stars 0 forks source link

GTLService Error returns error in half German - half English #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have app in German.
2. Share to folder that you do not have permission to share to.
3. Observe error message.

What is the expected output? 
The full message received should be in German

What do you see instead?
Part of the message is in German, the other part is in English

What version of the product are you using? On what operating system?
Code was pulled August 2013, Mac OS X 10.8

Please provide any additional information below.
Making this call:
[service executeQuery:query completionHandler:^(GTLServiceTicket *ticket, 
GTLDriveFile *uploadedFile,NSError *error)

and within the block, when i print out the error i get this:

Error Domain=com.google.GTLJSONRPCErrorDomain Code=403 "Der Vorgang konnte 
nicht abgeschlossen werden. (Insufficient permissions for this file)" 
UserInfo=0x107ed09d0 {error=Insufficient permissions for this file, 
NSLocalizedFailureReason=(Insufficient permissions for this file), 
GTLStructuredError=GTLErrorObject 0x10a0bd420: {message:"Insufficient 
permissions for this file" data:[1] code:403}}

As you can see part German part English.

Original issue reported on code.google.com by a.no...@techsmith.com on 3 Sep 2014 at 8:04

GoogleCodeExporter commented 9 years ago
Looks like you are just using NSErrors description method.  In addition to the 
normal NSError methods and UserInfo, take a look at GTLErrorObject.  There is a 
class helper method (+underlyingObjectForError:) that will extract back out the 
GTLErrorObject (if the NSError wraps one), that exposes the information 
provided by the server.  If those are still mixed, that's all server provided, 
so you'll want to follow up with the support pages for the given api about 
their error responses.

Original comment by thomasvl@google.com on 10 Sep 2014 at 7:12

GoogleCodeExporter commented 9 years ago

Original comment by grobb...@google.com on 19 Dec 2014 at 2:29