Skip to content

Improve error messaging for KV package #380

@asteurer

Description

@asteurer

I have a Spin app where I use a key-value store for something. I neglected to include a path to a key-value store in the spin.toml file, and I got an error when I tried opening the default store:

My code:

let store = openDefault();

The error:

Error while running request handler: cyclic object value
Stack:
  r/<@build/precompiled-source.js:58:1681
  s@build/precompiled-source.js:58:2089
  fetch@build/precompiled-source.js:58:1402
  async*@build/precompiled-source.js:9588:30

This error is not very helpful haha. I'm wondering what things could be done to improve the error message?

On a related note, maybe there are other things in the spin.toml that would throw errors if improperly configured. Might be worth making this part of a larger discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions