File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,10 @@ var (
193193 // ErrorGuildNotFound will be sent if the requested guild does not exist
194194 // Code: 20004
195195 ErrorGuildNotFound = Error {errors .New ("could not find guild" )}
196+
197+ // ErrorMaintenanceMode will be sent if there is ongoing maintenance
198+ // Code: 20005
199+ ErrorMaintenanceMode = Error {errors .New ("maintenance mode active" )}
196200)
197201
198202// Code will return the code of the error
@@ -284,6 +288,8 @@ func (e Error) Code() int {
284288 return 20003
285289 case ErrorGuildNotFound :
286290 return 20004
291+ case ErrorMaintenanceMode :
292+ return 20005
287293 default :
288294 return 0
289295 }
Original file line number Diff line number Diff line change @@ -597,6 +597,9 @@ func TestErrors(t *testing.T) {
597597 ErrorGuildNotFound : {
598598 Code : 20004 ,
599599 },
600+ ErrorMaintenanceMode : {
601+ Code : 20005 ,
602+ }
600603 }
601604
602605 for err , values := range errs {
Original file line number Diff line number Diff line change @@ -1229,7 +1229,7 @@ func TibiaDataHTMLDataCollector(TibiaDataRequest TibiaDataRequestStruct) (string
12291229 if location .Host == "maintenance.tibia.com" {
12301230 LogMessage := "maintenance mode detected on tibia.com"
12311231 log .Printf ("[info] TibiaDataHTMLDataCollector: %s!" , LogMessage )
1232- return "" , err
1232+ return "" , validation . ErrorMaintenanceMode
12331233 }
12341234 fallthrough
12351235
You can’t perform that action at this time.
0 commit comments