(ctx *gin.Context, errString string)
| 56 | } |
| 57 | |
| 58 | func writeError(ctx *gin.Context, errString string) { |
| 59 | status := http.StatusBadRequest |
| 60 | if ctx.Writer.Status() != http.StatusOK { |
| 61 | status = ctx.Writer.Status() |
| 62 | } |
| 63 | ctx.JSON(status, &model.Error{Error: http.StatusText(status), ErrorCode: status, ErrorDescription: errString}) |
| 64 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…