(subtype Subtype, format string, args ...any)
| 464 | } |
| 465 | |
| 466 | func NewAPIError(subtype Subtype, format string, args ...any) *APIError { |
| 467 | return &APIError{ |
| 468 | Problem: Problem{ |
| 469 | Category: CategoryAPI, |
| 470 | Subtype: subtype, |
| 471 | Message: formatMessage(format, args), |
| 472 | }, |
| 473 | } |
| 474 | } |
| 475 | |
| 476 | func (e *APIError) WithHint(format string, args ...any) *APIError { |
| 477 | e.Hint = formatMessage(format, args) |