Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider method that does not return anything results in invalid provider response RPC #301

Open
kpears201 opened this issue Aug 13, 2024 · 0 comments
Assignees

Comments

@kpears201
Copy link
Contributor

Author a provider class like:

class MyProvider {
   function action(actionParams) {
       console.log(actionParams)
   }
}

When action method is called and returns it generates rpc method like:

{
    "jsonrpc": "2.0",
    "method": "MyProvider.actionResponse",
    "params": {
        "correlationId": "abcdef-123-1111-111-1234234234"
    }
}

It is missing result which is a required field in the generated specification for provider responses.

If changed to:

class MyProvider {
   function action(actionParams) {
       console.log(actionParams)
       return null
   }
}

It should work as the result field gets set to null.

The Firebolt SDK should allow a provider method with no return. When result is undefined, set to null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant