Never accept work that is outside your core focus without disclosing that upfront to the client.
This is different from work that is within your wheelhouse, but because of constant technology changes you may know you’ll need to refresh your knowledge of (and even expand a bit throughout the engagement).
Is the line always clear? Absolutely not.
It’s up to you to decide what is within your core focus, wheelhouse, capabilities, and present capacity. And it’s also your prerogative to accept the proposed work if, after your disclosure, the client insists they’d prefer you to proceed.
Either way, be transparent and make peace with the decision: it’s entirely up to you.