User card loading failed

I don’t have the full trace, but I believe the error happens during gamification_score serialization for the user card.

Given the transient nature of these materialized views, a score lookup isn’t expected to cause a system-wide error, it should fall back to a “default score” when the view doesn’t exist.

There’s a bug in the materialized view existence check. It reports that a view exists when it actually doesn’t (at least not in the current public schema), which leads to a lookup on a non-existent view resulting in the error.

I think what happened here was, the materialized view was present in the backup schema created as part of the restore but not the public schema. The backup schema is retained for a while after the restore.

I’ve got a PR ready with a fix.

3 Likes