10 lines
202 B
Go
10 lines
202 B
Go
package dart
|
|
|
|
import "net/http"
|
|
|
|
type ErrorHandler func(err error, ctx *Context)
|
|
|
|
func defaultErrorHandler(err error, c *Context) {
|
|
c.JSON(http.StatusInternalServerError, Json{"error": err.Error()})
|
|
}
|