Skip to content

[FEATURE REQUEST] List dictionary item keys with errors in dictionary entry update #1583

@jasononeal

Description

@jasononeal

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:

  1. Modify the --verbose flag 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).
  1. Augment fastly dictionary-entry update with an optional flag --log-file to 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions