Skip to content

Commit

Permalink
Use specific error
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepeterson committed Jul 3, 2021
1 parent 66ccbce commit d1f7ee2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion service/request.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package service

import (
"errors"
"fmt"
"net/http"

Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit d1f7ee2

Please sign in to comment.