Set Temporal retry options per Exception type

Hello!
Is it possible to set retry options for an activity per each possible exception that may occur during it is execution? For example, if it is NullPointerException I would like to retry 3 times with an interval of 10 seconds and if it is an IllegalArgumentException I would like to retry 10 times with an interval of 20 seconds?

Service doesn’t support different retry options per error type. You can retry from the workflow code which would support any necessary logic, but it increases the workflow history size on every retry. Another option is to retry from the activity code without failing the activity.

What is the use case? To me, it looks like overengineering.

There is a business requirement to set different retry logic per different business exceptions that may occur during an activity execution. We decided to set retry for an activity for one type of exceptions and process as unrecoverable for others

i also have the same use case can anyone tell me how to achieve this.
What i want to do is if my activity return a certain kind of error i want to perform certain number of retries and if it returns other error i want to perform other retries.