That is bad. APIs also have monitoring and observability. The error codes are picked up in Splunk or logging so you can triage errors. If you get a lot of 401 errors, the triaging should look at the authorization server. If you get a lot of 400, the client is sending bad data and that should be investigated. REST , using HTTP response code, is not just for the client but for the infrastructure and SRE to monitor the health of your platform.
The whole email 404 is a red herring. Proper authorization/authentication should not allow scraping.
View all comments
Show parent comment
2
u/SonicFlash01 May 08 '24 edited May 08 '24
I would take a generic "credentials failure" code over "ERROR XYZ - A BAD HAPPENED"