Skip to content

[Building a Gateway] not expected response with circuitBreaker #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vinsse2001 opened this issue Oct 4, 2021 · 0 comments
Open

[Building a Gateway] not expected response with circuitBreaker #147

vinsse2001 opened this issue Oct 4, 2021 · 0 comments

Comments

@vinsse2001
Copy link

In 2nd paragraph ("Using Spring Cloud CircuitBreaker"), after adding route for circuitBreaker, I don't have expected response.
Expected:

HTTP/1.1 504 Gateway Timeout
content-length: 0

Obtained:

>curl --dump-header - --header 'Host: www.circuitbreaker.com' http://localhost:8080/delay/3
curl: (6) Could not resolve host: www.circuitbreaker.com'
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 136

{"timestamp":"2021-10-04T15:34:25.537+00:00","path":"/delay/3","status":404,"error":"Not Found","message":null,"requestId":"7668aa60-1"}

So I tried with complete code, I have same response (of course, with different tsp and id).
Is there some configuration missing?

For information, the curl command in first paragraph gives expected response:

>curl http://localhost:8080/get
{
  "args": {},
  "headers": {
    "Accept": "*/*",
    "Content-Length": "0",
    "Forwarded": "proto=http;host=\"localhost:8080\";for=\"0:0:0:0:0:0:0:1:58357\"",
    "Host": "httpbin.org",
    "Salut": "Toi ;)",
    "User-Agent": "curl/7.55.1",
    "X-Amzn-Trace-Id": "Root=1-615b1e8f-09519dd70684bfb6316288ec",
    "X-Forwarded-Host": "localhost:8080"
  },
  "origin": "0:0:0:0:0:0:0:1, 91.166.78.188",
  "url": "http://localhost:8080/get"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant