-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.go
39 lines (30 loc) · 959 Bytes
/
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
31
32
33
34
35
36
37
38
39
package pss
import "fmt"
// RequestNotFoundError indicates a request was not found
type RequestNotFoundError struct {
ID int
}
func (e *RequestNotFoundError) Error() string {
return fmt.Sprintf("Request not found with id [%d]", e.ID)
}
// ReplyNotFoundError indicates a reply was not found
type ReplyNotFoundError struct {
ID string
}
func (e *ReplyNotFoundError) Error() string {
return fmt.Sprintf("Reply not found with id [%s]", e.ID)
}
// AttachmentNotFoundError indicates a attachment was not found
type AttachmentNotFoundError struct {
Name string
}
func (e *AttachmentNotFoundError) Error() string {
return fmt.Sprintf("Attachment not found with name [%s]", e.Name)
}
// RequestFeedbackNotFoundError indicates feedback for a request was not found
type RequestFeedbackNotFoundError struct {
RequestID int
}
func (e *RequestFeedbackNotFoundError) Error() string {
return fmt.Sprintf("Feedback not found for request [%d]", e.RequestID)
}