Skip to content
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

More logs on tile download error #2784

Merged
merged 1 commit into from
Jan 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.mapfish.print.processor.Processor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpResponse;
Expand Down Expand Up @@ -228,8 +229,13 @@ protected Tile compute() {
return new Tile(null, getTileIndexX(), getTileIndexY());
} else if (statusCode != HttpStatus.OK) {
String errorMessage = String.format(
"Error making tile request: %s\n\tStatus: %s\n\toutMessage: %s",
"Error making tile request: %s\n\tStatus: %s\n\tStatus message: %s",
this.tileRequest.getURI(), statusCode, response.getStatusText());
LOGGER.debug(String.format(
"Error making tile request: %s\nStatus: %s\n" +
"Status message: %s\nServer:%s\nBody:\n%s",
this.tileRequest.getURI(), statusCode, response.getStatusText(),
response.getHeaders().getFirst(HttpHeaders.SERVER), response.getBody()));
this.registry.counter(baseMetricName + ".error").inc();
if (this.failOnError) {
throw new RuntimeException(errorMessage);
Expand Down