User signs up. Tries to upload a bad input file, which fails. The user-sample table gets stamped for that user ID with an error status. Then the user uploads a working file, it imputes and succeeds. That adds another row to user-sample with a success status for the same user ID. As long as the error user-sample row exists, the report does not render.
Solution: use just the entry which says "ready" if available. Else if there's one in "processing", get the latest one available. Else if there's one in "error", get the latest one available.
User signs up. Tries to upload a bad input file, which fails. The user-sample table gets stamped for that user ID with an error status. Then the user uploads a working file, it imputes and succeeds. That adds another row to user-sample with a success status for the same user ID. As long as the error user-sample row exists, the report does not render.