Skip to content

Instantly share code, notes, and snippets.

View duongphuhiep's full-sized avatar

DUONG Phu-Hiep duongphuhiep

  • lemonway.fr
  • Paris, France
View GitHub Profile
@duongphuhiep
duongphuhiep / Technical Error vs Business Error.md
Last active November 20, 2024 10:25
Technical Error vs Business Error

Technical Errors vs Business Errors

API's designer often categorize errors into "Technical" and "Functional" (or "Business") errors. However, this distinction may not make sense:

  • An API/micro-service should always return ONLY "Functional" (or "Business") errors.
  • The API/micro-service migh be crashed while processing a consumer's request and so the consumer will naturally get a technical error. But the API/micro-service should not deliberately return a "Technical" error for consumer. The simple fact that the App built a nice response called "Technical error", then gracefully return it, make it no longer a technical error, but a "fake" one.

We will explore the distinction between "real technical errors" and "fake technical errors". "Fake technical errors" are initially technical but later manifest as business errors, thus becoming "fake technical errors."

  • HTTP 404 Business error (or Fake technical error)
@duongphuhiep
duongphuhiep / .gitconfig
Last active August 30, 2024 08:42
fix git command
[user]
name = DUONG Phu-Hiep
email = [email protected]
[core]
autocrlf = true
editor = code
precomposeunicode = true
ignorecase = false
excludesfile =
[alias]
@dmitshur
dmitshur / gist:77cc54e53bbc0bf9a9a6
Last active February 19, 2020 10:01
How I use GOPATH with multiple workspaces.