Currently, the thanks api assumes that sending thanks will succeed. That will be addressed in T241474: Thank api assumes that echo event will go through, but a standard way for informing a user that the thanks were not sent should be designed
|T235873 Add variables in Abusefilter to detect/block thanks
|T241474 Thank api assumes that echo event will go through
|T241550 Design: What should happen if thanks fails
When thank isn't sent for non-AF reasons, I think there should be a notification like the one we see when a ping is unsuccessful, with a gray "File:OOjs UI icon userTalk-(ltr|rtl).svg". When it's been blocked by AF, there should be a red warning instead of "You thanked $1" (MediaWiki:Thanks-button-action-completed) that says e.g. "Your thank was not sent because it was blocked by the abuse/edit filter", but this should be the default warning. Just like the warn/disallow feature, this message should be editable, by creating a new page in the MediaWiki namespace. In my opinion, this is a rather clean way to implement it.