Fix up definition, add errorCode