QueryChanges: Include exception cause in BadRequestException
Change-Id: Ibde8720fe22df5213e4b22481f80085e908e6a46
This commit is contained in:
@@ -22,4 +22,12 @@ public class BadRequestException extends RestApiException {
|
|||||||
public BadRequestException(String msg) {
|
public BadRequestException(String msg) {
|
||||||
super(msg);
|
super(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param msg error text for client describing how request is bad.
|
||||||
|
* @param cause cause of this exception.
|
||||||
|
*/
|
||||||
|
public BadRequestException(String msg, Throwable cause) {
|
||||||
|
super(msg, cause);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class QueryChanges implements RestReadView<TopLevelResource> {
|
|||||||
String op = m.group(1);
|
String op = m.group(1);
|
||||||
throw new AuthException("Must be signed-in to use " + op);
|
throw new AuthException("Must be signed-in to use " + op);
|
||||||
}
|
}
|
||||||
throw new BadRequestException(e.getMessage());
|
throw new BadRequestException(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
return out.size() == 1 ? out.get(0) : out;
|
return out.size() == 1 ? out.get(0) : out;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user