Skip to content

Commit

Permalink
deprecate: deprecate AddError in favor of AddResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanhitt committed Dec 13, 2024
1 parent 1b4c443 commit fe7b7f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions option.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions option/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fe7b7f9

Please sign in to comment.