yusefnapora / w3name-rust-client

Other
2 stars 1 forks source link

add better error handling for publish command #4

Closed yusefnapora closed 2 years ago

yusefnapora commented 2 years ago

Since updating a record requires incrementing the sequence number, and because I didn't want to make you keep old revisions around on disk, the publish CLI command fetches the latest value and increments the sequence number if it exists.

At the moment, we're treating all publish errors as if they were "name not found" and falling back to creating a new "v0" revision. We should only do that if we get a 404 back from the API, and bail out on other errors.