Skip to content

Missing Null Checks in DAO Operations #2

@TopBeijing

Description

@TopBeijing

DAO methods such as updateMessageError and updatePrimaryBot use require or error for null checks after database lookups. If the data is missing, this will throw and may crash the app instead of handling the error gracefully.

Reproduce

  • Attempt to update a message or bot in a session that does not exist in the database.
  • Observe that the app throws an exception and may crash.

Expected Behaviors

  • DAO methods should handle missing data gracefully and provide meaningful error handling or recovery.

Suggestion

  • Replace require/error with proper error handling and user feedback in DAO methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions