Skip to content

docs(error): simplify status code retrieval - #468

Closed
tongium wants to merge 1 commit into
labstack:masterfrom
tongium:docs/custom-error-handling
Closed

tongium wants to merge 1 commit into
labstack:masterfrom
tongium:docs/custom-error-handling

Conversation

@tongium

@tongium tongium commented Oct 11, 2026

Copy link
Copy Markdown

Description

This small docs change updates the custom error handler example to use the existing echo.StatusCode(err) helper instead of the manual errors.As check.

Why:

  1. It makes getting the error code simpler and easier to read.
  2. Running go fix on the current snippet rewrites it into the generic form. Reusing echo.StatusCode(err) avoids that and keeps the example stable.

@tongium tongium closed this Oct 12, 2026
@tongium

tongium commented Oct 12, 2026

Copy link
Copy Markdown
Author

I think good to show how to works, it make user understand interface, so I decide to close PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant