Google Java api - error "com.google.gdata.util.ServiceException: Bad Gateway" during feed.insert (write)

I have two tables in a spreadsheet. I will copy and change the value from one sheet to another if some conditions are met. He has been working for 2 weeks and has been getting this problem from yesterday. There were no changes. The following error message appears while executing this statement.

Note that this error does not occur all the time, and also the error occurs after iterating some for loops, sometimes when x = 10 sometimes when x = 100 or x = 500

ERROR CODE:

 for (int x=1; x <= row_TODAY_WS;x++){
    for(int y=1; y <= col_TODAY_WS;y++){
       CellEntry newEntry = new CellEntry (x, y, feed_cell_0.getEntries().get(i).getPlainTextContent());
       feed_1.insert(newEntry);
      i++;
    }
  }

      

ERROR MESSAGE:

com.google.gdata.util.ServiceException: Bad Gateway
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 502 (Server Error)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-heipx 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{cation:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.gors/logo_sm_2.png) no-repeat}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/errors/logo_sm_2_hr.png) no-repeat 0%order-image:url(//www.google.com/images/errors/logo_sm_2_hr.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.goog/logo_sm_2_hr.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:55px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>502.</b> <ins>That?s an error.</ins>
  <p>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.  <ins>That?s all we know.</ins>

        at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:632)
        at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)
        at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)
        at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)
        at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)
        at com.google.gdata.client.Service.insert(Service.java:1409)
        at com.google.gdata.client.GoogleService.insert(GoogleService.java:613)
        at com.google.gdata.data.BaseFeed.insert(BaseFeed.java:535)

      

0


source to share


1 answer


HTTP Error 502 (Bad Gateway) - Server error. There is a problem with one of the google servers involved in the spreadsheet API launch. The problem is not with your code.

Your computer contacted the google server, which acted as a proxy for the server that would actually do the job. Then there was a problem on that second server, which meant it couldn't return a valid response to the proxy, which the proxy could then pass on to you. As a result, the proxy server sent you an HTTP 502 response.



I would hope Google systems are smart enough to detect these problems and automatically notify Google engineers. Maybe someone from Google is working on the problem right now. However, I do not work for Google, so I cannot say that this is true.

If nothing else, you can try posting on the Google Spreadsheets API forum .

+1


source







All Articles