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
"No response from server" when error occurs #2545
Comments
Maybe this answer 2584 can help you. |
Hi, The responses are valid json, for example: { The response-headers look like this: Does anybody know how to fix this? |
@ben31414 If the domain of your API in your swagger.json does not match that which swagger ui is hosted on, the response might be lacking CORS headers? The api could be only adding them to the successful responses? "error": "no response from server" is the error you get when the request is blocked by the CORS policy. |
@okneloper thanks a lot! For other people with the same problem, using the AWS API-Gateway: it seems that you have to add the header "access-control-allow-origin" to the method response of every error message and set it's value in the integration response to "'*'". |
This should no longer be an issue with 3.X. |
@webron, |
@kumarz Springfox is using Swagger-UI version The issue described here should not be happening on Springfox 2.8.0 |
version v2.2.8 of Swagger-UI
I am getting "No response from server" only when I test with incorrect parameters and Express's error handler gets called.
The browser returns results as expected. Also, in the Chrome network tab, I can see the response code as 400 (which is correct). However, the UI shows response code 0.
However, the successful calls are displayed without any issues.
The text was updated successfully, but these errors were encountered: