package invitationimp

import (
	"net/http"

	"github.com/tech/sendico/pkg/api/http/response"
	mutil "github.com/tech/sendico/server/internal/mutil/param"
)

func (a *InvitationAPI) respondBadReference(r *http.Request, err error) http.HandlerFunc {
	a.Logger.Warn("Failed to fetch invitation reference", mutil.PLog(a.irh, r))
	return response.BadReference(a.Logger, a.Name(), a.irh.Name(), a.irh.GetID(r), err)
}
