Merge pull request #272 from bsinno/fix_toomany_status_entries_dont_requeue
don't reject too many status entries exception
This commit is contained in:
@@ -41,6 +41,7 @@ import org.eclipse.hawkbit.repository.RepositoryConstants;
|
|||||||
import org.eclipse.hawkbit.repository.eventbus.event.TargetAssignDistributionSetEvent;
|
import org.eclipse.hawkbit.repository.eventbus.event.TargetAssignDistributionSetEvent;
|
||||||
import org.eclipse.hawkbit.repository.exception.EntityNotFoundException;
|
import org.eclipse.hawkbit.repository.exception.EntityNotFoundException;
|
||||||
import org.eclipse.hawkbit.repository.exception.TenantNotExistException;
|
import org.eclipse.hawkbit.repository.exception.TenantNotExistException;
|
||||||
|
import org.eclipse.hawkbit.repository.exception.ToManyStatusEntriesException;
|
||||||
import org.eclipse.hawkbit.repository.model.Action;
|
import org.eclipse.hawkbit.repository.model.Action;
|
||||||
import org.eclipse.hawkbit.repository.model.Action.Status;
|
import org.eclipse.hawkbit.repository.model.Action.Status;
|
||||||
import org.eclipse.hawkbit.repository.model.ActionStatus;
|
import org.eclipse.hawkbit.repository.model.ActionStatus;
|
||||||
@@ -153,8 +154,8 @@ public class AmqpMessageHandlerService extends BaseAmqpService {
|
|||||||
return handleAuthentifiactionMessage(message);
|
return handleAuthentifiactionMessage(message);
|
||||||
} catch (final IllegalArgumentException ex) {
|
} catch (final IllegalArgumentException ex) {
|
||||||
throw new AmqpRejectAndDontRequeueException("Invalid message!", ex);
|
throw new AmqpRejectAndDontRequeueException("Invalid message!", ex);
|
||||||
} catch (final TenantNotExistException teex) {
|
} catch (final TenantNotExistException | ToManyStatusEntriesException e) {
|
||||||
throw new AmqpRejectAndDontRequeueException(teex);
|
throw new AmqpRejectAndDontRequeueException(e);
|
||||||
} finally {
|
} finally {
|
||||||
SecurityContextHolder.setContext(oldContext);
|
SecurityContextHolder.setContext(oldContext);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user