error handling

Improved failure detection for functional errors based on request attributes