-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
Description
When there are errors matching the json update file to the existing dictionary item entries, there is not a way to know which rows were not found.
In the example, there are 15 keys with problems, but the output does not specify which 15 keys within the entire data set had errors.
$fastly dictionary-entry update --service-name cdn-service --dictionary-id=XxXXx0XXxXxxXxxXX0x0X0 --file=dictionary_updates.json --verbose
ERROR: the Fastly API returned 400 Bad Request: Bad request (15 dictionary_item(s) for delete not found).
Describe the solution you would like
Rather than only specifying the number, it would be better to output additional details on the erroring keys.
This could be accomplished in several ways:
- Modify the
--verboseflag to specify additional levels of verbosity
$fastly dictionary-entry update --service-name cdn-service --dictionary-id=XxXXx0XXxXxxXxxXX0x0X0 --file=dictionary_updates.json --verbose=2
NOT FOUND: Item: 20/100 Item Key: /my/page
NOT FOUND: Item: 43/100 Item Key: /another/subpage/example
...
...
NOT FOUND: Item: 93/100 Item Key: /special/event/page
ERROR: the Fastly API returned 400 Bad Request: Bad request (89 dictionary_item(s) for delete not found).
- Augment
fastly dictionary-entry updatewith an optional flag--log-fileto send each item attempted and the resulting status
$fastly dictionary-entry update --service-name cdn-service --dictionary-id=XxXXx0XXxXxxXxxXX0x0X0 --file=dictionary_updates.json --log-file=fastly_dictionary_update.log
With log file content similar to
[2025-11-19 14:03:01]: Item Key: /my/page Status: NOT FOUND
[2025-11-19 14:03:02]: Item Key: /services Status: UPDATED
[2025-11-19 14:03:02]: Item Key: /another/subpage/example Status: NOT FOUND
[2025-11-19 14:03:03]: Item Key: /about-us Status: DELETED
[2025-11-19 14:03:03]: Item Key: /special/event/page Status: NOT FOUND
[2025-11-19 14:03:04]: Item Key: /blog/2025-announcement Status: UPDATED
[2025-11-19 14:03:04]: Item Key: /contact Status: UPDATED