package sresponse

import (
	"net/http"

	"github.com/tech/sendico/pkg/api/http/response"
	"github.com/tech/sendico/pkg/mlogger"
	"github.com/tech/sendico/pkg/mservice"
	"go.uber.org/zap"
)

func BadRPassword(logger mlogger.Logger, source mservice.Type, err error) http.HandlerFunc {
	logger.Info("Failed password validation check", zap.Error(err))
	return response.BadRequest(logger, source, "invalid_request", err.Error())
}
