You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
The kv::format_error function calls upon the help() function to print out helpful details when the API returns an error. Currently, this function looks for KV-specific error codes to figure out which help message to print. So, if we generalize this help function to cf::format_error, we need to extract this help() function and ideally have it provide helpful messaging for other CF API error codes.
#841 actually already fixed this: it introduces a http::format_error function that takes a callback as an argument. This callback function takes an error code and returns a string providing more information about it. This means we now have a general error formatting function for the CF API's error responses, which any subcommand that calls a particular API (e.g. the routes API) can use to format CF API errors.
Any API call we make with cloudflare-rs should be formatted in a single function. Looking at you https://github.com/cloudflare/wrangler/blob/master/src/commands/kv/namespace/site.rs#L42
This is related to #360
The text was updated successfully, but these errors were encountered: