
Here's how it happened:
• The user in the screenshot posted a thread which has the event "Thread" which is set to award 200 credits when a thread is posted in that node and 200 credits deducted when it's deleted.
• He posted it and gained 200 credits normally.
• I went to edit his thread and BAM that error appeared.
I know why this happens, altough you might not see it as a bug, I personally see it as bug indeed. I'll explain what I think it happened:
• Editing his thread, altough I'm not the author of it (being a staff), the thread was considered as "deleted" (firing the negation event) and then "posted as new thread".
• This usually generates 2 events (and 2 notifications sent to the user). The first event will try to deduct is trying 200 credits from his account and, if succeed, another event will add again those 200 credits.
• He doesn't have enough (from the screenshot you can see 99 credits), and here's why this weird error appears. I'd better expect:
a) A notification saying he doesn't have enough credits (I don't like this solution, but at least it's an improvement from a weird error message to something humanily redeable, which, at the same time, doesn't give users precious informations about our files location and database structure)
b) His credits being reset to 0 as set in the Currency Settings (I don't like this solution, he'll end up losing just 99 credits and then gaining 200 credits)
c) His credits not being deducted at all, because I'm not deleting and starting a new thread, but I'm just editing a thread (ideal solution)
d) His credits being temporarily deducted by 200 (going to -101), ignoring the Currency Settings, and then added 200 credits (alternative but still ideal solution)
Hope it helps better understanding this issue. For any questions, I'm here.