-
Notifications
You must be signed in to change notification settings - Fork 0
/
statusCodes.go
33 lines (28 loc) · 1015 Bytes
/
statusCodes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//********************************************************************************************************************//
//
// Copyright (C) 2018 - 2021 J&J Ideenschmiede GmbH <info@jj-ideenschmiede.de>
//
// This file is part of goerecht24.
// All code may be used. Feel free and maybe code something better.
//
// Author: Jonas Kwiedor (aka gowizzard)
//
//********************************************************************************************************************//
package goerecht24
import (
"errors"
)
// statusCodes
func statusCodes(status string) error {
// Check each status codes
switch status {
case "400 Bad Request":
return errors.New("push was not successful")
case "401 Unauthorized":
return errors.New("unauthorized request. No API key specified, the specified key is invalid or your eRecht24 membership has expired")
case "424 Failed Dependency":
return errors.New("push request not successfully executed due to errors in requests to clients")
default:
return nil
}
}