Performance: Built-in HTTP exceptions
MEDIUM IMPACT
This affects server response time and client perceived latency by how quickly errors are handled and sent back.
throw new NotFoundException('User not found');throw new Error('User not found');| Pattern | Server Processing | Error Handling Overhead | Response Time | Verdict |
|---|---|---|---|---|
| Generic Error Throw | Normal | High (extra conversion) | Slower | [X] Bad |
| Built-in HTTP Exception | Normal | Low (direct response) | Faster | [OK] Good |