MCPcopy Create free account
hub / github.com/compozy/agh / statusForResourceRequestError

Function statusForResourceRequestError

internal/api/core/resources.go:359–365  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

357}
358
359func statusForResourceRequestError(err error) int {
360 status := StatusForResourceError(err)
361 if status == http.StatusInternalServerError {
362 return http.StatusBadRequest
363 }
364 return status
365}
366
367func parseResourcePath(c *gin.Context) (resources.ResourceKind, string, error) {
368 kind := resources.ResourceKind(strings.TrimSpace(c.Param("kind")))

Calls 1

StatusForResourceErrorFunction · 0.85