Using an alternative account, I thanked myself for the first edit of a page I created (revision 454372620). The resulting notification links to https://en.wikipedia.org/w/index.php?title=User:This,_that_and_the_other/sandbox/Schfoof&oldid=prev&diff=454372620, which is obviously invalid, because there is no previous revision.
This situation could also use a dedicated message. The current message, TTO's apostrophe thanked you for your edit on User:This, that and the other/sandbox/Schfoof. could be replaced by TTO's apostrophe thanked you for creating the page User:This, that and the other/sandbox/Schfoof.
That URL is not supposed to be invalid. In older MediaWiki versions, it showed only a diff header (with no diff), but not an error message.
Here's a live example (running MW 1.29.1): https://wikiapiary.com/w/index.php?title=WikiApiary:About&oldid=7&diff=prev
In fact, here is a task that documents this behavior (and complains about it): T55299
I don't think this was an intentional change. Especially because the error message is incorrect. It says "One revision of this difference (454372620) was not found.", but revision 454372620 definitely exists, it's the other revision (with no ID) that doesn't.