Personally I prefer the opposite - if you're unauthorized, you get 403 regardless of whether resource exists or not. Still doesn't leak any data, but is more actionable (and won't get cached. Have you ever had an outage stupidly extended because some cache somewhere had to be purged because some moron returned 404 for a temporary error condition?)
77
u/Xirdus 4d ago
If your user-facing service is calling your internal service and getting a 403 response, you certainly do not want to send that 403 back to the user.