14 lines
172 B
Go
14 lines
172 B
Go
package util
|
|
|
|
import (
|
|
"errors"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
func HandleRecordNotFound(err error) error {
|
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
|
return nil
|
|
}
|
|
return err
|
|
}
|