Small bug fix in history contents API error handling.