2024-02-14 14:55:41 +01:00
|
|
|
package handler
|
2024-02-14 00:08:14 +01:00
|
|
|
|
|
|
|
|
import "net/http"
|
|
|
|
|
|
|
|
|
|
func InternalServerErrorHandler(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
w.WriteHeader(http.StatusInternalServerError)
|
|
|
|
|
_, err := w.Write([]byte("500 Internal Server Error"))
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NotFoundHandler(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
w.WriteHeader(http.StatusNotFound)
|
|
|
|
|
_, err := w.Write([]byte("404 Not Found"))
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|