Reduce validation inconsistency

Modify error message for assert statements.
Add checks for response headers.