error-pages
🚧 Pretty server's error pages in the docker image & git repository (for traefik, k8s, nginx and so on) (by tarampampam)
problem
Library to assist with RFC 7807 implementation for Go web services (by lpar)
error-pages | problem | |
---|---|---|
1 | 7 | |
720 | 6 | |
- | - | |
8.3 | 0.0 | |
4 days ago | almost 4 years ago | |
Go | Go | |
MIT License | BSD 3-clause "New" or "Revised" License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
error-pages
Posts with mentions or reviews of error-pages.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-10-16.
-
☸️ Kubernetes NGINX Ingress Controller: 10+ Complementary Configurations for Web Applications
controller: config: custom-http-errors: 404,408,500,501,502,503,504,505 # Prepackaged default error pages from https://github.com/tarampampam/error-pages/wiki/Kubernetes-&-ingress-nginx # multiple themes here: https://tarampampam.github.io/error-pages/ defaultBackend: enabled: true image: repository: ghcr.io/tarampampam/error-pages tag: 2.21 # latest as of 01/04/2023 here: https://github.com/tarampampam/error-pages/pkgs/container/error-pages extraEnvs: - name: TEMPLATE_NAME value: lost-in-space # one of: app-down, cats, connection, ghost, hacker-terminal, l7-dark, l7-light, lost-in-space, matrix, noise, shuffle - name: SHOW_DETAILS # Optional: enables the output of additional information on error pages value: "false"
problem
Posts with mentions or reviews of problem.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-04-28.
-
Proposal: errors.With(err, other error) error
The approach I tried for APIs was to do the opposite, and have the DB layer use an error type which includes an appropriate HTTP status code and details of exactly what's wrong as well as the regular error value.
-
Looking for code design opinions on checking errors for behaviour
If your goal is to report more meaningful structured errors to a REST API caller, you might find this helpful.
-
Exploring error for HTTP response
Check out https://github.com/lpar/problem
-
Logging error in go
You might find this helpful.
-
resperr: associate status codes and messages with your errors
Alternative which implements RFC 7807
-
Defining HTTP Status code from error types
For a web service, try RFC 7807. I've got a library to help implement it. A similar approach could help with regular application errors too.
-
Validation in Go. How do I answer on a invalid request via Rest API with html error template?
The best thing is to make your REST API respond as per RFC 7807 (helper Go library here), which gives you a standard way to add human-readable error messages. If the error should be displayed on a web page, handle that client-side using JavaScript DOM manipulation.
What are some alternatives?
When comparing error-pages and problem you can also consider the following projects:
simplerr - Advanced Go error handling, made simple
errors - A drop-in replacement for Go errors, with some added sugar! Unwrap user-friendly messages, HTTP status code, easy wrapping with multiple error types.
kubernetes-ingress - NGINX and NGINX Plus Ingress Controllers for Kubernetes
grpcerr - A library which makes working with gRPC errors easy, both for gRPC and HTTP APIs.
semerr - A way of dealing with Golang errors
authelia - The Single Sign-On Multi-Factor portal for web apps
spa-to-http - Lightweight zero-configuration SPA HTTP server. Serves SPA bundle on HTTP port so it plays well with Traefik out of the box. Compatible with Vue.js, React and Angular
ingress-nginx - Ingress-NGINX Controller for Kubernetes