Skip to content

When a cloud function has no result the response is malformed #4818

@SebC99

Description

@SebC99

Issue Description

Cloud functions return a json response formatted as {result: ... } which is then interpreted by the client SDKs
But when it should return a undefined result, instead of returning {result: undefined}, it returns {} which is really not a valid json object, and which causes an error in the JS SDK for example.

To ensure the JSON response can be stringify we could use a replacer method to replace all the undefined by null values...?
Or we need to ensure all SDKs can cope with this kind of invalid json result...

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