(msg, errType string, status int, retryAfter time.Duration)
| 650 | } |
| 651 | |
| 652 | func newResponseError(msg, errType string, status int, retryAfter time.Duration) *ResponseError { |
| 653 | return &ResponseError{ |
| 654 | ErrorResponse: &shared.ErrorResponse{ |
| 655 | Error: shared.ErrorObjectUnion{ |
| 656 | Message: msg, |
| 657 | Type: errType, |
| 658 | }, |
| 659 | Type: constant.ValueOf[constant.Error](), |
| 660 | }, |
| 661 | StatusCode: status, |
| 662 | RetryAfter: retryAfter, |
| 663 | } |
| 664 | } |
| 665 | |
| 666 | func (e *ResponseError) Error() string { |
| 667 | if e.ErrorResponse == nil { |
no outgoing calls