From a399051eae419d725c0a2e91b21d436bfd7f6202 Mon Sep 17 00:00:00 2001
From: Jan Semmelink <jan@uafrica.com>
Date: Thu, 4 Nov 2021 15:58:04 +0200
Subject: [PATCH] Update error message text

---
 api/handler.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/api/handler.go b/api/handler.go
index f089e58..5829cb2 100644
--- a/api/handler.go
+++ b/api/handler.go
@@ -27,7 +27,7 @@ func NewHandler(fnc interface{}) (handler, error) {
 	//arg[0] must be a struct for params. It may be an empty struct, but
 	//all public fields require a json tag which we will use to math the URL param name
 	if err := validateStructType(fncType.In(0)); err != nil {
-		return h, errors.Wrapf(err, "second arg %v is not valid params struct type", fncType.In(0))
+		return h, errors.Wrapf(err, "first arg %v is not valid params struct type", fncType.In(0))
 	}
 	h.RequestParamsType = fncType.In(0)
 
-- 
GitLab