1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-12-23 22:11:10 +02:00
Files
imgproxy/monitoring/errformat/errformat.go

19 lines
307 B
Go
Raw Permalink Normal View History

2022-07-20 15:49:05 +06:00
package errformat
import (
"fmt"
"reflect"
"github.com/imgproxy/imgproxy/v3/ierrors"
)
func FormatErrType(errType string, err error) string {
errType += "_error"
if _, ok := err.(*ierrors.Error); !ok {
errType = fmt.Sprintf("%s (%s)", errType, reflect.TypeOf(err).String())
}
return errType
}