Add concrete example earlier in view.

This commit is contained in:
Eric Myhre 2021-12-15 10:48:22 -08:00 committed by GitHub
parent 08c5c07f2c
commit de8f755d0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,16 @@ The goals are:
- to have human readable, and also search-engine friendly errors; - to have human readable, and also search-engine friendly errors;
- and to promote rigorous error handling, and be amenable to static analysis. - and to promote rigorous error handling, and be amenable to static analysis.
In short:
```json
{
"code": "error-codes-matter",
"message": "messages matter too",
"details": {"extensible": "yet simple"}
}
```
How Errors Should Be How Errors Should Be
-------------------- --------------------
@ -22,6 +32,10 @@ You can continue scrolling down to go the "principles" route,
or if you're hands-on type, [jump to serialization examples](#serum-serialization) or if you're hands-on type, [jump to serialization examples](#serum-serialization)
or jump to [information about libraries you can use to easily adopt Serum](#working-with-serum) or jump to [information about libraries you can use to easily adopt Serum](#working-with-serum)
Principles
----------
### Part I ### Part I
Errors should have a string "code". Errors should have a string "code".