Skip to content

No error info when attempting to use an unavailable formatterΒ #362

Open
@minrk

Description

@minrk

Description

When a formatter is unavailable, POST /format fails with 404 here, but the error isn't shown to the user, instead it shows this:

Screenshot 2024-09-05 at 09 32 58

Reproduce

  1. add a nonexistent formatter, e.g. "asdf" in jupyterlab settings
  2. invoke formatter
  3. see error

Expected behavior

I'd expect the error message to be shown, which would help point the way to what's wrong in my configuration.
Presumably need to handle the error format here.

On the server side, I'd recommend sending a JSON error response, rather than a plain-text one. That should be easier for clients to handle consistently.

Context

  • jupyterlab 4.2.4
  • jupyterlab_code_formatter 3.0.2

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