Spaces:
Paused
Paused
Download internal/api/errors.go from bolikoto/daili-usage: direct link, hf CLI and curl.
- Browser
- Download file 286 Bytes
-
https://huggingface.co/spaces/bolikoto/daili-usage/resolve/main/internal/api/errors.go
- Command line
-
hf download hf://spaces/bolikoto/daili-usage/internal/api/errors.go
-
curl -L -o errors.go https://huggingface.co/spaces/bolikoto/daili-usage/resolve/main/internal/api/errors.go
286 Bytes
| package api | |
| import ( | |
| "log/slog" | |
| "net/http" | |
| "github.com/gin-gonic/gin" | |
| ) | |
| func writeInternalError(c *gin.Context, message string, err error) { | |
| if err != nil { | |
| slog.Error(message, "error", err) | |
| } | |
| c.JSON(http.StatusInternalServerError, gin.H{"error": "internal server error"}) | |
| } | |