mirror of
https://github.com/serum-errors/serum-spec.git
synced 2024-11-21 20:54:48 +01:00
Add concrete example earlier in view.
This commit is contained in:
parent
08c5c07f2c
commit
de8f755d0b
14
README.md
14
README.md
|
@ -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".
|
||||||
|
|
Loading…
Reference in a new issue