Skip to main content

Errors

All applications can return/throw errors. The CIDL gives a specific place where you can define these errors.

tip

You can define any number of methods required for your use case.

Definition

errors is an array of objects where each object is an error

errors:
- id: InvalidUserName
msg: The provided username is not valid
- id: WarehouseIsClose
msg: The warehouse cannot transact because
KeywordTypeOptionalityDescription
errorsErrorsBodyOptional
Errors Body
KeywordTypeOptionalityDescription
idstringRequiredMust comply with the targeted programming language
msgstringRequired

Web-based documentation

The errors object can be visualized in the CIDL web-based doc. The documentation is automatically generated from our vscode-codigo extension.

CIDL Web-based doc

Next steps

You can follow our guides to start implementing use cases step by step or check our examples here

Join the Código community 💚

Código is a growing community of developers. Join us on Discord and GitHub