I am having a API(https://xyz-abc.com/api/signed/resource/get?signedKey=234e23423) for downloading a resource(xlsx, pdf) file. There is an email sent to the user which has a link to download the resource. This link is given href as the API url i.e. https://xyz-abc.com/api/signed/resource/get?signedKey=234e23423
When user clicks on this link from their email, a new tab is opened and that API is called. The file gets downloaded into the user's browser as an attachment. But sometimes the new tab that is opened is not getting closed and in that browser tab the user is shown following message -
This site can’t be reached
The web page at https://xyz-abc.com/api/signed/resource/get?signedKey=234e23423 might be temporarily down or it may have moved permanently to a new web address.
ERR_INVALID_RESPONSE
Why this error is shown in the browser and that too in some of the cases. When user again clicks on the same URL then the tab is getting closed automatically and the file is getting downloaded.
I am using nginx and java spring controllers at the backend.
Update 1 - Adding the network tab screenshot -
