Error Handling and Logging
Error Type
type Error struct {
Status int `json:"status"`
Code string `json:"code"`
Message string `json:"message"`
Details map[string]interface{} `json:"details,omitempty"`
Inner error `json:"-"`
StackTrace string `json:"-"`
}Server-Originated Errors
// resp is the server's response
if resp.Error != nil {
err := core_errors.Error{
Status: resp.Error.Status,
Code: resp.Error.Code,
Message: resp.Error.Message,
Inner: resp.Error,
StackTrace: string(debug.Stack())
}Internal SDK Errors
LicenseHandler Layer: Logging and Safe Return
Example: Full Error Flow for Floating License Release
Was this helpful?