You can now use successorerror in jersey returns directly.