From d1f7ee293227c630443da164882c93a82d17f341 Mon Sep 17 00:00:00 2001 From: Jesse Peterson Date: Sat, 3 Jul 2021 11:21:01 -0700 Subject: [PATCH] Use specific error --- service/request.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service/request.go b/service/request.go index d1ea491..4726e73 100644 --- a/service/request.go +++ b/service/request.go @@ -1,6 +1,7 @@ package service import ( + "errors" "fmt" "net/http" @@ -69,7 +70,7 @@ func CheckinRequest(svc Checkin, r *mdm.Request, bodyBytes []byte) ([]byte, erro err = fmt.Errorf("marshal bootstrap token: %w", err) } default: - return nil, NewHTTPStatusError(http.StatusBadRequest, mdm.ErrUnrecognizedMessageType) + return nil, errors.New("unhandled check-in request type") } return respBytes, err }