Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DX of error messages

DX of error messages

This is material of DevRelCon London 2017.

https://london-2017.devrel.net

Atsushi Nakatsugawa

December 06, 2017
Tweet

More Decks by Atsushi Nakatsugawa

Other Decks in Technology

Transcript

  1. PAGE DAY 2017/11/01 # MOONGIFT X / 19 DX of

    error messages Atsushi Nakatsugawa, MOONGIFT
  2. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Who am

    I? @goofmint fb.me/goofmint Atsushi Nakatsugawa CEO at MOONGIFT Organizer of DevRelCon Tokyo 2017 Organizer of DevRel Meetup in Tokyo/Singapore/Sydney/Bangalore
  3. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Run! $

    ./awesome-code.sh {code: 503, message: “Something wrong”}
  4. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Got an

    error… (#^ω^)ピキピキ Annoy ˢ
  5. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Update &

    Run! $ ./awesome-code.sh {code: 401, message: “Check your code”}
  6. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Got errors…

    (#`Д´)ノゴルァァァァァ!! Frustrating ˢ
  7. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Update again

    & Run! $ ./awesome-code.sh {code: 401, message: “Other error”}
  8. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Worst Example

    : Insta*ram Their API returns just “Oops, an error occurred.”
  9. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Best error

    message Developer can understand what should they do to solve it.
  10. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Basic $

    ./awesome-code.sh 401 Validation error
  11. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Improve #1

    $ ./awesome-code.sh 401 Validation error
 {code: “E4001”, message: “Missing required parameters”}
  12. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Improve #2

    $ ./awesome-code.sh 401 Validation error
 {code: “E4001”, message: “Name and email parameter are required.”}
  13. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Improve #3

    $ ./awesome-code.sh 401 Validation error
 {code: “E4001”, message: “Name and email parameter are required. You can check the document https://example.com/doc/register. ”}
  14. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Good Example

    : Square $ ruby order-sample.rb square_connect/api_client.rb:66:in `call_api': Bad Request - {"errors": [{"category":"INVALID_REQUEST_ERROR ","code":"MISSING_REQUIRED_PARAMETE R","detail":"Missing required parameter.","field":"line_items[0]. name"}]} (SquareConnect::ApiError)
  15. PAGE DAY 2017/11/01 # MOONGIFT X / 19 Conclusion It

    is inevitable that errors are generated when developing It is opportunity to increase their royalty if you provide best error message. Best error message is indicating next step to developers.
  16. PAGE DAY 2017/11/01 # MOONGIFT X / 19 # THANK

    YOU @goofmint fb.me/goofmint