Run policy without errors

Hi!
Is there a way to stop a policy if the request is a bad request (status code 400 - 500)?