mirror of
https://github.com/m1k1o/neko.git
synced 2025-07-29 14:39:12 +02:00
first commit
This commit is contained in:
commit
0c8af21fab
95 changed files with 5312 additions and 0 deletions
17
server/internal/http/endpoint/error.go
Normal file
17
server/internal/http/endpoint/error.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package endpoint
|
||||
|
||||
import "fmt"
|
||||
|
||||
type HandlerError struct {
|
||||
Status int
|
||||
Message string
|
||||
Err error
|
||||
}
|
||||
|
||||
func (e *HandlerError) Error() string {
|
||||
if e.Err != nil {
|
||||
return fmt.Sprintf("%s: %s", e.Message, e.Err.Error())
|
||||
}
|
||||
|
||||
return e.Message
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue