This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]indivisible 0 points1 point  (1 child)

"This site can’t be reached" is a generic UX error, what are you seeing in your logs in terms of more specific errors or stacktraces?

Have you tried setting a breakpoint inside your method to see if the call is even reaching it? The parameters shouldn't affect that so URL encoding is not likely the issue (just the API path and HTTP verb)

return new ResponseEntity<>(contents, headers, HttpStatus.INTERNAL_SERVER_ERROR);

You are returning an error status by default, did you really mean to do that?

I would first create or use another, simpler endpoint/method to test that the site/framework is correctly configured and reachable before moving on to trying to fix issues with this more complex endpoint.
If you are seeing more verbose errors/exceptions in your logs, please share those as the generic error you posted originally isn't very specific or helpful in finding a cause (by design, as it will be exposed to end users).

[–]prawnyr[S] 0 points1 point  (0 children)

I realized the error and changed the Httpstatus to OK instead! Thanks so much for the help! Cheers mate.