Is there a way to mark a lambda instance to not be re-used from within (e.g. if it gets itself into a bad state)?

This may be a stupid question and I couldn’t find anything useful in the AWS or Serverless documentation (so I assume it isn’t easily possible, but…).

I’m using headless Chrome in a lambda and it generally works fine, but every x00,000 requests, it gets itself into a bad state and then that request and a lot of following requests fail for a while.
Then it will ‘fix itself’.
And re-running with the same lambda and arguments (and input data) will now work fine.

So, I’m assuming that the Chrome process(es) get themselves into a bad state for some reason and all subsequent re-uses of the lambda instance fail until it is recycled for a fresh one (or something else timesout).

Now, I can spot if Chrome doesn’t start and/or cannot be connected to, but all I can do is fail early, of course.

I was hoping there might be a way to say, “I’ve failed spectacularly and suggest you stop reusing this instance”.

Does such a thing exist?

Thanks