aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/api0/errors.go
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-13 01:47:13 -0400
committerpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-13 01:47:13 -0400
commit1a551e0210b2b9056bc80ed0b56fcb704124a1a4 (patch)
tree44ec1c69937669189c83dd5c00563e667086e56c /pkg/api/api0/errors.go
parent053ce0184c586b27a054c51e5b24132778156d14 (diff)
downloadAtlas-1a551e0210b2b9056bc80ed0b56fcb704124a1a4.tar.gz
Atlas-1a551e0210b2b9056bc80ed0b56fcb704124a1a4.zip
pkg/api/api0: Add INTERNAL_SERVER_ERROR
Diffstat (limited to 'pkg/api/api0/errors.go')
-rw-r--r--pkg/api/api0/errors.go6
1 files changed, 6 insertions, 0 deletions
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)
}