Fix x-client-id error message

This commit is contained in:
Zoe Roux 2024-01-29 00:01:55 +01:00
parent 6ba0786608
commit 853bfd5f9b

View File

@ -66,7 +66,7 @@ func SanitizePath(path string) error {
func GetClientId(c echo.Context) (string, error) {
key := c.Request().Header.Get("X-CLIENT-ID")
if key == "" {
return "", errors.New("missing client id. Please specify the X-CLIENT-ID header to a guid constant for the lifetime of the player (but unique per instance)")
return "", echo.NewHTTPError(http.StatusBadRequest, "missing client id. Please specify the X-CLIENT-ID header to a guid constant for the lifetime of the player (but unique per instance)")
}
return key, nil
}