From de8f755d0bfeba4be2acc659a9526eb86173edb2 Mon Sep 17 00:00:00 2001 From: Eric Myhre Date: Wed, 15 Dec 2021 10:48:22 -0800 Subject: [PATCH] Add concrete example earlier in view. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 192282b..aebff1d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,16 @@ The goals are: - to have human readable, and also search-engine friendly errors; - 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 -------------------- @@ -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 jump to [information about libraries you can use to easily adopt Serum](#working-with-serum) + +Principles +---------- + ### Part I Errors should have a string "code".