summaryrefslogtreecommitdiff
path: root/src/services/vyos-http-api-server
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2022-04-07 11:58:29 -0500
committerJohn Estabrook <jestabro@vyos.io>2022-04-07 16:11:51 -0500
commit4c89134c632de11da52564f432483011a1cd0034 (patch)
tree13d03f4cfa450f7b9cefb5c04bb9eb9c8a6532ee /src/services/vyos-http-api-server
parent44c67e54ef6ecdf4d7b62e765ccfa4e724c14316 (diff)
downloadvyos-1x-4c89134c632de11da52564f432483011a1cd0034.tar.gz
vyos-1x-4c89134c632de11da52564f432483011a1cd0034.zip
http api: T4347: return complete and consistent error codes
Diffstat (limited to 'src/services/vyos-http-api-server')
-rwxr-xr-xsrc/services/vyos-http-api-server2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server
index 1000d8b72..c1b595412 100755
--- a/src/services/vyos-http-api-server
+++ b/src/services/vyos-http-api-server
@@ -352,7 +352,7 @@ class MultipartRoute(APIRoute):
return error(e.status_code, e.detail)
except Exception as e:
if request.ERR_MISSING_KEY:
- return error(422, "Valid API key is required")
+ return error(401, "Valid API key is required")
if request.ERR_MISSING_DATA:
return error(422, "Non-empty data field is required")
if request.ERR_NOT_JSON: