API Testing · Senior · Question 19 of 75
How should a service consuming third-party APIs be tested for safety?
- 1Only test the happy path, because errors are rare
- 2Trust them fully, since partners test their own APIs
- 3Treat responses as untrusted: validate, limit, handle failures
Show the answer
Correct answer: Treat responses as untrusted: validate, limit, handle failures
Explanation
Unsafe consumption of APIs is in the OWASP list. Stubs can return huge, malformed or malicious payloads to check validation.