1

When someone calls https://example.com/schedule/5 and that schedule doesn't exist, I return a 404.

When someone calls https://example.com/scheduel/5, which is a mispelled address, I return a 404.

This isn't good because it makes data errors indistinguishable from code errors.

Is there a standard way to distinguish between the two? (Other than just dumping a stack trace in the body.)

Jonathan Allen
  • 68,373
  • 70
  • 259
  • 447
  • 1
    Think of the URI as the "name" of the resource. From that point of view, both of those examples are a mis-naming of a resource and it makes sense to treat them the same. – msbit Apr 19 '21 at 23:28
  • does this help? https://stackoverflow.com/a/26845858/13449712 – Drdilyor Apr 19 '21 at 23:41

0 Answers0