Add 413 as a possible response for /config/import

This commit is contained in:
Joe Kralicky 2024-09-19 15:33:15 -04:00
parent 4791a4cb98
commit f4a35731cb
No known key found for this signature in database
GPG key ID: 75C4875F34A9FB79
4 changed files with 36 additions and 0 deletions

View file

@ -565,6 +565,15 @@ func (response ImportConfiguration400JSONResponse) VisitImportConfigurationRespo
return json.NewEncoder(w).Encode(response)
}
type ImportConfiguration413JSONResponse ErrorResponse
func (response ImportConfiguration413JSONResponse) VisitImportConfigurationResponse(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(413)
return json.NewEncoder(w).Encode(response)
}
type ImportConfiguration500JSONResponse ErrorResponse
func (response ImportConfiguration500JSONResponse) VisitImportConfigurationResponse(w http.ResponseWriter) error {