mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
return a more explicit error message (fix #723)
This commit is contained in:
@@ -436,8 +436,7 @@ public class FeedREST {
|
|||||||
try {
|
try {
|
||||||
feedEntryFilteringService.filterMatchesEntry(req.getFilter(), TEST_ENTRY);
|
feedEntryFilteringService.filterMatchesEntry(req.getFilter(), TEST_ENTRY);
|
||||||
} catch (FeedEntryFilterException e) {
|
} catch (FeedEntryFilterException e) {
|
||||||
Throwable root = Throwables.getRootCause(e);
|
return Response.status(Status.BAD_REQUEST).entity(e.getCause().getMessage()).type(MediaType.TEXT_PLAIN).build();
|
||||||
return Response.status(Status.BAD_REQUEST).entity(root.getMessage()).type(MediaType.TEXT_PLAIN).build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FeedSubscription subscription = feedSubscriptionDAO.findById(user, req.getId());
|
FeedSubscription subscription = feedSubscriptionDAO.findById(user, req.getId());
|
||||||
|
|||||||
Reference in New Issue
Block a user