Skip to content

"encryptAndWrite" and other functions do not throw error even error occurs during the process #9

@nakaakist

Description

@nakaakist

In encryptAndWrite function, errors during the encrypting & writing process are all caught, and returned as string.

https://github.com/LIT-Protocol/CeramicIntegration/blob/main/src/integration.ts#L71

However, this behavior is confusing because the document says that the return value of this function is the created stream ID.

How about just throwing error when error occurs? It would reduce confusion, and also would help developers easily debug their apps.

(fyi: we use this function in our app, we had to write a bit ugly error handling due to this behavior.)

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