playback: return errors as JSON (#5656)

this is aligned with all other HTTP-based services.
This commit is contained in:
Alessandro Ros
2026-04-09 17:11:03 +02:00
committed by GitHub
parent c7826d406b
commit 67caaea4fe
+4 -1
View File
@@ -101,7 +101,10 @@ func (s *Server) writeError(ctx *gin.Context, status int, err error) {
s.Log(logger.Error, err.Error())
// add error to response
ctx.String(status, err.Error())
ctx.AbortWithStatusJSON(status, &defs.APIError{
Status: defs.APIErrorStatusError,
Error: err.Error(),
})
}
func (s *Server) writeErrorNoLog(ctx *gin.Context, status int, err error) {