Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

System.err Bad Response: </html> #35

Open
dhakimTRX opened this issue May 21, 2018 · 2 comments
Open

System.err Bad Response: </html> #35

dhakimTRX opened this issue May 21, 2018 · 2 comments

Comments

@dhakimTRX
Copy link

I'm using version 1.6.0 of ForecastIOLib, linked as
Dependencies{
implementation 'com.github.dvdme:ForecastIOLib:1.6.0'
}

I'm seeing error messages in my Android logs but I can't debug them further using what ForecastIO is logging.

I see:
05-07 18:05:47.151 6447 6780 W System.err: Bad Response:

I believe this is printed at ForecastIO.java:781,
System.err.println("Bad Response: " + response + "\n");

It seems that the library is only printing the last line of the error stream, and that error stream seems to be an HTML page.

If you could return a response code or the response stream to the application, it could decide whether or not to retry or let the end user address the issue in some way.

@dhakimTRX
Copy link
Author

As an aside,
I suspect the underlying failure was due to either invalid construction of latitude/longitude due to localization or inclusion of spaces in the exclude url in some app installs.

@dhakimTRX
Copy link
Author

Appears the html response is from an nginx Bad Gateway that triggers if spaces in the exclude url are not url encoded.

<title>502 Bad Gateway</title>

502 Bad Gateway


nginx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant