Skip to content

Exceptions are caught but not logged in Spotlight #1211

@lavylavenderr

Description

@lavylavenderr

Environment

  • Spotlight v4.8.0
  • Docker Compose
  • Bun v1.3.4
  • SapphireJS v.5.4.0

Steps to Reproduce

  1. Start up Docker Compose Stack with Spotlight via bunx @spotlightjs/spotlight and pass in Docker Compose command. (In this case, it's building a Dockerfile for a Sapphire Bot application)

  2. Remove ALL error listeners commonly included with this framework's boiler plate.

  3. Create a sample command as seen below, assuming all error message listeners have been removed

public async chatInputRun(interaction) {
  throw new Error("Test exception");
}
  1. Run the command.

Expected Result

The error should've been caught by Spotlight and logged to the web dashboard, but whenever the exception is thrown.

Actual Result

The error is not logged, it seems that Spotlight is consuming it but not registering it. When ran without spotlight the error is thrown. See the video below for comparisons.

This is what happens when you run with Spotlight.
https://github.com/user-attachments/assets/1b91087e-9af6-4654-831c-2aad795981cd

And when you run it without Spotlight.
https://github.com/user-attachments/assets/227da919-9718-4ce6-a3c6-0ef6bfdc7947

Additional Information

I've gone ahead and provided the flow a error takes when thrown within a command below to help with debugging/resolving the issue, since the reviewer may not be familiar with this framework.

First, when a error is thrown, it emits a event as seen here, which is then picked up by this file, where it uses the logger to emit a error to the console, as seen in this file here. And this when I would imagine Spotlight steps in and is supposed to pick it up, however it does not.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions