Autocomplete
GET https://maps.googleapis.com/maps/api/place/search/json?input=wash&sensor=true&key=my_key
-> REQUEST_DENIED
Wait some seconds:
-> INVALID_REQUEST
Then waiting and without waiting:
-> INVALID_REQUEST
-> INVALID_REQUEST
Another test
Click try out from API console:
GET https://maps.googleapis.com/maps/api/place/search/json?location=-33.88471,151.218237&radius=100&sensor=true&key=my_key
-> good response
Without waiting some seconds same request:
-> REQUEST_DENIED
Wait some seconds, same request:
-> good response
Is there some place in documentation or anywhere I can troubleshoot this?
Related
I am using Webflux to make a Flux of concurrent requests via proxy to a web server. Depending on the proxy, sometimes the connection fails. I would like to catch these errors and handle them (ideally by returning an empty Mono object)
2019-02-17 16:48:19.947 ERROR 32265 --- [or-http-epoll-8] r.n.resources.PooledConnectionProvider : [id: 0xf7c8834b, L:/192.168.2.247:45536 - R:101.248.64.72/101.248.64.72:80] Pooled connection observed an error
io.netty.handler.proxy.ProxyConnectException: http, none, /101.248.64.72:80 => domain.com:443, io.netty.channel.unix.Errors$NativeIoException: syscall:read(..) failed: Connection reset by peer
at io.netty.handler.proxy.ProxyHandler.setConnectFailure(ProxyHandler.java:344) [netty-handler-proxy-4.1.31.Final.jar:4.1.31.Final]
at io.netty.handler.proxy.ProxyHandler.exceptionCaught(ProxyHandler.java:246) [netty-handler-proxy-4.1.31.Final.jar:4.1.31.Final]
These messages are very long and make the log unreadable later on if debugging is required. I've tried catching it in line with the request code by using .onErrorResume(err -> Mono.empty()) but it doesn't seem to prevent the error logs.
Below is my code:
return proxiedWebClient
.get()
.uri(uri)
.exchange()
.flatMap(clientResponse -> clientResponse.toEntity(String.class))
.onErrorResume(error -> Mono.empty());
The expected result is that connection errors are simply dropped and not added into the Flux when Flux.merge is subsequently called.
I am trying to understand the source of thie cookie values.
1st image -> first request/ response
2nd image -> second request / response
The first response has no cookies. And the second request is sending cookies in request header. What is the source of this???
[index.html-> first request in chrome dev tool][1]
second request -> see the request header; these values arent recieved during the first response
In Chrome Developer Tools, I'm getting a 500 error in the Console tab, for a GET request:
But in the Network tab, I don't see that request; I only see a POST request for the same page, with a 200 status:
Shouldn't I be seeing the SplitShip.aspx GET request in the Network tab?
Shouldn't I be seeing the SplitShip.aspx GET request in the Network tab?
You should of course, but maybe this request has been made using an AJAX call or something. So make sure you apply proper filter to your Network tab by selecting All:
This way Chrome will show All requests being sent to the server, including XHR ones. Are you seeing the smoking gun now?
I am getting error 500
When I am executing rest service uploading the *.bdc file in Jmeter.
While I am running the same service file from postman give success 200.
JMeter:
Postman:
Check the header you are sending with your request.
Best way to debug this would be:
Use firebug or chrome developer tools, compare the request you are sending from JMeter and browser sends.
Check the headers that are being sent and other parameters being sent, accordingly fix your script.
I'm using Express, React, Ajax, Plivo.
I have an ajax POST request that sends the data(user phone number and text message) from client to my express server. When I send the post request I get the text message on my phone but when I check chrome dev tools it tells me that the request status is pending(which in the server it logs as status 202), after a while the request status changes to failed on chrome dev tools.
This is what I get on the server logs:
Status: 202
API Response:
{ api_id: 'api-id-string',
message: 'message(s) queued',
message_uuid: [ 'random message_uuid string' ] }
POST / - - ms - -
Status: 202
API Response:
{ api_id: 'api-id-string',
message: 'message(s) queued',
message_uuid: [ 'random message_uuid string' ] }
POST / - - ms - -
I noticed that I get the sms immediately after making the POST request but the request stays pending for 4 minutes if it's sent twice. What I mean is, if the request pass the 2 minutes mark I get the text message again and then the request fails in 3.9 minutes. If I get the sms once then the request fails at 2 minutes. So every 2 minutes I get POST / - - ms - - which I'm guessing it means that's when the server stops trying to complete the request so it retries to complete it and sends the sms again.
In the image above I submitted two POST requests, two different text messages. First it took approximately 4 minutes to fail, for that one I got the same sms twice. In the second one it took 2 minutes to fail, I got the sms once for that once.
I've been looking at other answers and seems like for a lot of people the request is sent twice because of favicon but in my case I'm console logging the url request and the url is the same for both. Also its not making another request, it seems like its retrying to make the request so this question is not a duplicate.
This is the code I have on my server:
app.post('/', function(req, res) {
console.log(req.url);
p.send_message({
src: plivoNumber,
dst: '1'+req.body.number,
text: req.body.message,
}, function(status, response) {
console.log('Status:', status);
console.log('API Response:\n', response);
});
});
This is the ajax POST request:
$.post('/', {
number: this.state.number,
message: this.state.message
});
I'm not very experienced so my debugging skill is not the best or maybe I'm just making a newbie mistake.
You're not responding to the client requests so the connections/requests are timing out. Add at least a res.end() in your p.send_message() callback if you have nothing to send back to the client (other than a 200 OK HTTP status code).