Skip to content

Fallback server errors rather than starting #241

@julianstirling

Description

@julianstirling

Describe the bug
The fallback server shows an internal server error if you try to see what the error is. This is because the config is a ThingServerConfig but we try to dump it with json.dumps. The tests pass as the fallback tests don't pass in any config.

To Reproduce

Create conf.json with:

{
    "things": {
        "example": "labthings_fastapi.example_things:ThingThatCantStart"
    }
}

Run:
labthings-server --fallback -c conf.json

Looks like the fallback server is fine until you go to 127.0.0.1:5000, where you get an internal server error

Expected behaviour
No error

System:

  • OS: Kubunto 24.04
  • Python version: 3.11
  • Version: 0.0.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions