Skip to content

[P1] Silent exception swallowing — add logging throughout #6

Description

@ShadowWalkerNC

Summary

Multiple routes silently swallow exceptions:

except Exception:
    posts = []
except Exception:
    profile = {}

Impact

Production bugs are invisible. Sentry can't catch what's never re-raised or logged. Debugging becomes guesswork.

Fix

Log before swallowing, or let Sentry capture properly:

except Exception:
    app.logger.exception("Failed to load post history for user %s", uid)
    return jsonify({'success': False, 'error': 'Server error', 'posts': []})

Audit all except Exception blocks across app.py and all modules and add app.logger.exception() at minimum.

Effort: ~2 hours

Part of full audit: #1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions