mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
15 lines
429 B
Go
15 lines
429 B
Go
package common
|
|
|
|
import (
|
|
"errors"
|
|
"net/http"
|
|
|
|
"github.com/hanzo-fi/go-libs/v5/pkg/observe/log"
|
|
"github.com/hanzo-fi/go-libs/v5/pkg/transport/api"
|
|
)
|
|
|
|
func InternalServerError(w http.ResponseWriter, r *http.Request, err error) {
|
|
logging.FromContext(r.Context()).Error(err)
|
|
api.WriteErrorResponse(w, http.StatusInternalServerError, api.ErrorInternal, errors.New("Internal error. Consult logs/traces to have more details."))
|
|
}
|