@@ -159,28 +159,20 @@ def main():
159159 print (" Upserted EXT-002 (single)" )
160160
161161 print ("\n 4c. Upsert multiple records (UpsertMultiple bulk)..." )
162- try :
163- client .records .upsert (
164- TABLE_NAME ,
165- [
166- UpsertItem (
167- alternate_key = {KEY_COLUMN .lower (): "EXT-003" },
168- record = {"new_productname" : "Widget C" , "new_price" : 29.99 },
169- ),
170- UpsertItem (
171- alternate_key = {KEY_COLUMN .lower (): "EXT-004" },
172- record = {"new_productname" : "Widget D" , "new_price" : 39.99 },
173- ),
174- ],
175- )
176- print (" Upserted EXT-003, EXT-004 (bulk)" )
177- except Exception as ex : # noqa: BLE001
178- print (f" UpsertMultiple FAILED: { ex } " )
179- if hasattr (ex , "status_code" ):
180- print (f" Status: { ex .status_code } " )
181- if hasattr (ex , "service_error_code" ):
182- print (f" Service error code: { ex .service_error_code } " )
183- print (" (single upsert worked, bulk did not - known issue under investigation)" )
162+ client .records .upsert (
163+ TABLE_NAME ,
164+ [
165+ UpsertItem (
166+ alternate_key = {KEY_COLUMN .lower (): "EXT-003" },
167+ record = {"new_productname" : "Widget C" , "new_price" : 29.99 },
168+ ),
169+ UpsertItem (
170+ alternate_key = {KEY_COLUMN .lower (): "EXT-004" },
171+ record = {"new_productname" : "Widget D" , "new_price" : 39.99 },
172+ ),
173+ ],
174+ )
175+ print (" Upserted EXT-003, EXT-004 (bulk)" )
184176
185177 # ------------------------------------------------------------------
186178 # Step 5: Upsert again (updates existing via single PATCH)
0 commit comments