Error categories

Suggested error response format (JSON)

400 Bad Request (invalid URL)

{
  "error": "Invalid URL",
  "details": "originalUrl must be a valid http(s) URL"
}

404 Not Found (unknown shortCode)

{
  "error": "Not Found",
  "details": "shortCode does not exist"
}

410 Gone (expired)

{
  "error": "Expired",
  "details": "This short URL has expired"
}

500 Internal Server Error

{
  "error": "Internal Server Error"
}

Implementation notes