From 30c051889a97fc07b42d66bf19f93f75a8074524 Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Tue, 25 Oct 2022 19:02:33 -0400 Subject: [PATCH] Make error messages clearer --- controller/handler_edge_ctrl/errors.go | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/controller/handler_edge_ctrl/errors.go b/controller/handler_edge_ctrl/errors.go index 1055cd040..928dfe7d8 100644 --- a/controller/handler_edge_ctrl/errors.go +++ b/controller/handler_edge_ctrl/errors.go @@ -25,27 +25,17 @@ func (internalErrorWrapper) ErrorCode() uint32 { type InvalidApiSessionError struct{} func (InvalidApiSessionError) Error() string { - return "Invalid Session" + return "invalid api session" } func (self InvalidApiSessionError) ErrorCode() uint32 { return edge.ErrorCodeInvalidApiSession } -type InvalidSessionError struct{} - -func (InvalidSessionError) Error() string { - return "Invalid Session" -} - -func (self InvalidSessionError) ErrorCode() uint32 { - return edge.ErrorCodeInvalidSession -} - type WrongSessionTypeError struct{} func (WrongSessionTypeError) Error() string { - return "Invalid Session" + return "incorrect session type" } func (self WrongSessionTypeError) ErrorCode() uint32 { @@ -55,7 +45,7 @@ func (self WrongSessionTypeError) ErrorCode() uint32 { type InvalidEdgeRouterForSessionError struct{} func (InvalidEdgeRouterForSessionError) Error() string { - return "Invalid Session" + return "invalid edge router for session" } func (self InvalidEdgeRouterForSessionError) ErrorCode() uint32 {