You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-07-17 01:42:36 +02:00
fix panic from datadog disabled
This commit is contained in:
@ -238,6 +238,7 @@ func APP(shutdown chan os.Signal, appCtx *AppContext) http.Handler {
|
||||
Redis: appCtx.Redis,
|
||||
}
|
||||
app.Handle("GET", "/v1/health", check.Health)
|
||||
app.Handle("GET", "/ping", check.Ping)
|
||||
|
||||
// Handle static files/pages. Render a custom 404 page when file not found.
|
||||
static := func(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
|
@ -27,7 +27,13 @@ func Errors(log *log.Logger, renderer web.Renderer) web.Middleware {
|
||||
if er := before(ctx, w, r, params); er != nil {
|
||||
|
||||
// Log the error.
|
||||
log.Printf("%d : ERROR : %+v", span.Context().TraceID(), er)
|
||||
if span != nil && span.Context() != nil {
|
||||
log.Printf("%d : ERROR : %+v", span.Context().TraceID(), er)
|
||||
} else {
|
||||
log.Printf("ERROR : %+v", er)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Respond to the error.
|
||||
if web.RequestIsJson(r) {
|
||||
|
Reference in New Issue
Block a user