top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Google translate API TranslationException message list

+1 vote
1,521 views

I am using google translate API for the translation. In the translation, if any exception occurs, it throws TranslateException with a message.I have added logs in my code which are:

com.google.cloud.translate.TranslateException: Daily Limit Exceeded
com.google.cloud.translate.TranslateException: User Rate Limit Exceeded

and text too long when char limit exceeds 5000 characters in a single request.

I searched in google API docs for TranslateException but didn't find.I want a list of all exception messages like User Rate Limit Exceeded, Daily Limit Exceeded etc.

posted Aug 17, 2017 by Shivam Kumar Pandey

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
Is Translate API enabled and also billing?
yes, billing is enabled.
I want to handle this exception based on the message.
I have already checked above links. I need all possible messages [exception.message] .Found some of the messages in second link https://developers.google.com/drive/v3/web/handle-errors thanks but here is the problem, I have handled
1.user rate limit,
2. day limit
later got new messages which are
3. `Request payload size exceeds the limit: 204800 bytes` and
4,'Text too long' (when char exceeds 5000 limits).
 
So I have to handle all situations and each in a different way.Already covered above listed issues and thanks @salil for your active participation. I just want to cover all possible scenarios here only.
Any action on me?
No sir thank you.If I find something better, I will add in this thread.
Hi Shivam,

How did you handle Error 3: `Request payload size exceeds the limit: 204800 bytes'.
I looked online, but couldnt find anything.
Borken down the request into multiple with the limit of allowed size.

Similar Questions
+3 votes

Do Google Search API have any limit for the website like google custom search, I could not find any documentation?
Please help...

+3 votes

I want get Number of indexed pages of any website so, it will give me exact number of pages in google.
What I have tried:

Uri queryUri = new Uri(string.Format("http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=site:{0}", url));
using (WebClient client = new WebClient())
{
    string getString = client.DownloadString(queryUri);
    dynamic s = JsonConvert.DeserializeObject(getString);
    var IndexedPage = s["responseData"]["cursor"]["estimatedResultCount"].Value;
    lblIndexedPageRecv.Text = IndexedPage;
}

its working but not giving me right answer

my code is giving different values then other online webCheckers like one of this: http://www.pingler.com/seo-tools/tools/google-indexed-pages-checker

+1 vote

the following commands have unique implementation in unix box.

Need to implement in informatica(etl tool). If not any windows solution for the same

sed 's/^#//g' < kam_account_calls.txt > kam_account_calls1.txt

perl -pi -e 's/#//' /coe/informatica/v712_OMJ/FAD/TgtFiles/C3i/CNTDEMO.csv

+1 vote

I want to implement a GPS in my application to get the user the nearest location of "abc places" I and then display it in list-view in android as well as in Google map.I found a tutorial that does exactly what I want. Unfortunately when my POI is not include under any type in Google Supported Places types list,So I got to use my own list and then call it to my Android,Am I right so far?

but I just want to know is it possible that I can use that tutorial and modify it to fit my needs if yes could you please point me what should I modify/add/delete.

it's my first application with GPS.

this is the tutorial URL :http://www.androidhive.info/2012/08/android-working-with-google-places-and-maps-tutorial/

...