Skip to content

Commit

Permalink
Merge 286d043 into 30d071d
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed Aug 20, 2018
2 parents 30d071d + 286d043 commit 53cc0fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 4.X.X (TBD)

### Bug fixes

* Catch Exception within DefaultDelivery class [#361](https://github.com/bugsnag/bugsnag-android/pull/361)

## 4.6.0 (2018-08-02)

* Android P compatibility fixes - ensure available information on StrictMode violations is collected [#350](https://github.com/bugsnag/bugsnag-android/pull/350)
Expand Down
4 changes: 4 additions & 0 deletions sdk/src/main/java/com/bugsnag/android/DefaultDelivery.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

class DefaultDelivery implements Delivery {

private static final int HTTP_BAD_REQUEST = 400;
private final ConnectivityManager connectivityManager;

DefaultDelivery(ConnectivityManager connectivityManager) {
Expand Down Expand Up @@ -79,6 +80,9 @@ int deliver(String urlString,
return conn.getResponseCode();
} catch (IOException exception) {
throw new DeliveryFailureException("IOException encountered in request", exception);
} catch (Exception exception) {
Logger.warn("Unexpected error delivering payload", exception);
return HTTP_BAD_REQUEST;
} finally {
IOUtils.close(conn);
}
Expand Down

0 comments on commit 53cc0fd

Please sign in to comment.