forked from containers/podman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/bindings: add new APIVersionError error type
When a new API call is added to the bindings we should guard it based on the version and throw a useful error. Right now an old server that does not implement a given endpoint would throw a "NOT FOUND" error which is not good for callers. Instead implement a custom error type to give a usefule error instead. This allows bindings users to call errors.As() to know if they call and to old version. Signed-off-by: Paul Holzinger <[email protected]>
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters