-
Notifications
You must be signed in to change notification settings - Fork 9
/
alks_error.go
30 lines (25 loc) · 1.23 KB
/
alks_error.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
package alks
import (
"fmt"
)
type AlksError struct {
StatusCode int
RequestId string `json:"requestId"`
Err error
}
func (r *AlksError) Error() string {
return fmt.Sprintf("status %d: requestID %s: err %v", r.StatusCode, r.RequestId, r.Err)
}
type AlksResponseError struct {
StatusMessage string `json:"statusMessage"`
Errors []string `json:"errors"`
RequestId string `json:"requestId"`
}
var AlksResponsErrorStrings = "ALKS Errors: %s \nContact the ALKS Team for assistance on Slack at #alks-client-support"
var GenericAlksError = "ALKS Errors: Contact the ALKS Team for assistance on Slack at #alks-client-support"
var ErrorStringFull = "[%s] ALKS Error %d Msg: %s\n Contact the ALKS Team for assistance on Slack at #alks-client-support"
var ErrorStringNoReqId = "ALKS Error %d Msg: %s\n Contact the ALKS Team for assistance on Slack at #alks-client-support"
var ErrorStringOnlyCodeAndReqId = "[%s] ALKS Error %d\n Contact the ALKS Team for assistance on Slack at #alks-client-support"
var ErrorStringOnlyCode = "ALKS Error %d\n Contact the ALKS Team for assistance on Slack at #alks-client-support"
var ParseErrorReqId = "[%s] Error parsing ALKS Error response: %s"
var ParseError = "Error parsing ALKS Error response: %s"