The `null` check is good. Want to submit a PR?
 I should be able to do that :p
I'll send a PR later then.

Thanks.
 Does it make sense to add tests for this ?
I guess that would just be createError / check accessor results tests, not sure it'd be very very useful.
 No, you can skip that.

NPE trying to get the body of a RetrofitError without response
In `RetrofitError` we have

``` java
public Object getBody() {
  TypedInput body = response.getBody();
  if (body == null) {
    return null;
  }
  try {
    return converter.fromBody(body, successType);
  } catch (ConversionException e) {
    throw new RuntimeException(e);
  }
}
```

and something similar for `getBodyAs(Type)`.

if `response` is null, as is the case for a network error for example (`UnknownHostException` etc), an NPE is thrown.

Now I didn't submit a fix yet because maybe you want to explicitly fail in this case ("don't try to get the body of an error without a response"), not sure, but in any case I usually consider NPEs as bug.

I think adding

``` java
if (response == null) {
  return null;
}
```

before would be consistent, but in case where we want to fail we should at least throw a more explicit exception.

retrofit/src/main/java/retrofit/RetrofitError.java
retrofit/src/main/java/retrofit/RetrofitError.java
diff --git a/retrofit/src/main/java/retrofit/RetrofitError.java b/retrofit/src/main/java/retrofit/RetrofitError.java
index 3ee113207d..39438fc26b 100644
--- a/retrofit/src/main/java/retrofit/RetrofitError.java
+++ b/retrofit/src/main/java/retrofit/RetrofitError.java
@@ -77,6 +77,9 @@ public boolean isNetworkError() {
    * the generic type of the supplied {@link Callback} parameter.
    */
   public Object getBody() {
+    if (response == null) {
+      return null;
+    }
     TypedInput body = response.getBody();
     if (body == null) {
       return null;
@@ -90,6 +93,9 @@ public Object getBody() {
 
   /** HTTP response body converted to specified {@code type}. */
   public Object getBodyAs(Type type) {
+    if (response == null) {
+      return null;
+    }
     TypedInput body = response.getBody();
     if (body == null) {
       return null;
