From 1a551e0210b2b9056bc80ed0b56fcb704124a1a4 Mon Sep 17 00:00:00 2001 From: pg9182 <96569817+pg9182@users.noreply.github.com> Date: Thu, 13 Oct 2022 01:47:13 -0400 Subject: pkg/api/api0: Add INTERNAL_SERVER_ERROR --- pkg/api/api0/errors.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/api/api0/errors.go b/pkg/api/api0/errors.go index 95b5c00..18e814b 100644 --- a/pkg/api/api0/errors.go +++ b/pkg/api/api0/errors.go @@ -19,6 +19,10 @@ const ( ErrorCode_DUPLICATE_SERVER ErrorCode = "DUPLICATE_SERVER" // A server with this port already exists for your IP address ) +const ( + ErrorCode_INTERNAL_SERVER_ERROR ErrorCode = "INTERNAL_SERVER_ERROR" +) + // Message returns the default message for error code n. func (n ErrorCode) Message() string { switch n { @@ -46,6 +50,8 @@ func (n ErrorCode) Message() string { return "The version you are using is no longer supported" case ErrorCode_DUPLICATE_SERVER: return "A server with this port already exists for your IP address" + case ErrorCode_INTERNAL_SERVER_ERROR: + return "Internal server error" default: return string(n) } -- cgit v1.2.3