We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2a80bb commit c70e7b3Copy full SHA for c70e7b3
controller/user.go
@@ -51,8 +51,9 @@ func (ctrl *UserController) GetPosts(c echo.Context) error {
51
ctx := c.Request().Context()
52
posts, err := ctrl.uc.GetPosts(ctx, userID)
53
if err != nil {
54
- if errors.As(err, &entity.ErrNotFound{}) {
55
- return echo.NewHTTPError(http.StatusNotFound, err.Error())
+ errNF := &entity.ErrNotFound{}
+ if errors.As(err, errNF) {
56
+ return echo.NewHTTPError(http.StatusNotFound, errNF.Error())
57
}
58
59
logger.Errorf("error GET /user/{userID}/post: %s", err.Error())
0 commit comments