fixed json in buildErrorObject