You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: error.go
    path of file: ./repos/CHAOS/repositories
    
    the code of the file until where you have to start completion: package repositories

import (
	"errors"
	"gorm.io/gorm"
)

var ErrNotFound = errors.New("not found")
    
func HandleError(err error) error {
	switch err {
	case gorm.ErrRecordNotFound:
		return ErrNotFound
	default:
		return err
	}
}