cozy / cozy-client

Document store and React components for the Cozy platform
MIT License
13 stars 13 forks source link

[client] Throw a nice error when the user omitted to add a schema #205

Open drazik opened 6 years ago

drazik commented 6 years ago

In https://github.com/cozy/cozy-client/pull/158/commits/d600671312c287763ff01511949a74e94338e804, we made it required to provide a schema to cozy-client. But when we omit it, the error thrown is something like:

Error: No schema found for 'io.cozy.contacts' doctype

We should customize this message to make it clearer that the user must check that (s)he provided a schema to cozy-client initialization.

ptbrowne commented 6 years ago

Everything that makes the error message clearer is good. A link to the relevant section in the docs would be nice also.