From a903bdb530dc9aac1a60dd7ce454db163e6f481f Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Thu, 15 Aug 2019 16:55:18 +0800 Subject: [PATCH] Add detailed error mesasge for 404 error --- errors.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/errors.go b/errors.go index d72718f2d..64fc66ca6 100644 --- a/errors.go +++ b/errors.go @@ -121,7 +121,11 @@ func (e ErrDefault403) Error() string { return "Action Forbidden" } func (e ErrDefault404) Error() string { - return "Resource not found" + e.DefaultErrString = fmt.Sprintf( + "Resource not found: [%s %s], error message: %s", + e.Method, e.URL, e.Body, + ) + return e.choseErrString() } func (e ErrDefault405) Error() string { return "Method not allowed"