Skip to content

Missing SQL query files do not prevent bot commands from running #4

@Miatya

Description

@Miatya

Problem

In SalesTracker, if an expected SQL query file (such as insertSale.sql, etc.) is missing, only a warning is logged, but the code does not prevent subsequent database operations from failing due to undefined or invalid queries.

Steps to Reproduce

  1. Remove or rename a query file under data/queries/ (e.g., insertSale.sql).
  2. Use a feature that requires this query (e.g., tracking a sale).
  3. Notice potential failures when attempting to use undefined queries.

Expected Behavior

Bot should fail more gracefully or at least provide clearer feedback when a required query is missing, rather than continuing with possibly undefined objects.

Suggested Fix

  • Check criticality for missing queries, and if they are required for core functions, throw errors instead of only logging warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions