Fix error response handler to look for nested status property