// custom centralized error handling func errorHandler(ctx *weavebox.Context, err error) { http.Error(ctx.Response(), "Hey some error occured: "+err.Error(), http.StatusInternalServerError) }