diff --git a/option.go b/option.go index 1d8b94f5..0acaec64 100644 --- a/option.go +++ b/option.go @@ -294,6 +294,7 @@ func OptionDeprecated() func(*BaseRoute) { // AddError adds an error to the route. // It replaces any existing error previously set with the same code. // Required: should only supply one type to `errorType` +// Deprecated: Use `OptionAddResponse` instead func OptionAddError(code int, description string, errorType ...any) func(*BaseRoute) { var responseSchema SchemaTag return func(r *BaseRoute) { diff --git a/option/option.go b/option/option.go index c9db4d02..17dd30f0 100644 --- a/option/option.go +++ b/option/option.go @@ -146,6 +146,7 @@ var OperationID = fuego.OptionOperationID var Deprecated = fuego.OptionDeprecated // AddError adds an error to the route. +// Deprecated: Use `AddResponse` instead. var AddError = fuego.OptionAddError // AddResponse adds a response to a route by status code