summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/vyos/opmode.py4
-rw-r--r--src/services/api/graphql/session/errors/op_mode_errors.py6
2 files changed, 8 insertions, 2 deletions
diff --git a/python/vyos/opmode.py b/python/vyos/opmode.py
index 17a9ab581..19c476b1c 100644
--- a/python/vyos/opmode.py
+++ b/python/vyos/opmode.py
@@ -45,6 +45,10 @@ class PermissionDenied(Error):
"""
pass
+class UnsupportedOperation(Error):
+ """ Requested operation is technically valid but is not implemented yet. """
+ pass
+
class IncorrectValue(Error):
""" Requested operation is valid, but an argument provided has an
incorrect value, preventing successful completion.
diff --git a/src/services/api/graphql/session/errors/op_mode_errors.py b/src/services/api/graphql/session/errors/op_mode_errors.py
index 7bc1d1d81..4029fd0a1 100644
--- a/src/services/api/graphql/session/errors/op_mode_errors.py
+++ b/src/services/api/graphql/session/errors/op_mode_errors.py
@@ -4,12 +4,14 @@ op_mode_err_msg = {
"UnconfiguredSubsystem": "subsystem is not configured or not running",
"DataUnavailable": "data currently unavailable",
"PermissionDenied": "client does not have permission",
- "IncorrectValue": "argument value is incorrect"
+ "IncorrectValue": "argument value is incorrect",
+ "UnsupportedOperation": "operation is not supported (yet)",
}
op_mode_err_code = {
"UnconfiguredSubsystem": 2000,
"DataUnavailable": 2001,
"PermissionDenied": 1003,
- "IncorrectValue": 1002
+ "IncorrectValue": 1002,
+ "UnsupportedOperation": 1004,
}