Documentation
¶
Overview ¶
Package apiError provides a structure to represent error responses from API calls. Copyright (c) APIMatic. All rights reserved.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiError ¶
type ApiError struct {
Request http.Request `json:"Request"`
StatusCode int `json:"StatusCode"`
Headers map[string]string `json:"Headers"`
Body string `json:"Body"`
}
ApiError is the base struct for all error responses from the server. It holds information about the original HTTP request, the status code, headers, and response body.
func NewApiError ¶
NewApiError is the constructor function for ApiError. It creates and returns a pointer to an ApiError instance with the given status code and response body.
Click to show internal directories.
Click to hide internal directories.