wrap error JSON in an array for consistency