Skip to content

Commit

Permalink
Merge pull request #56 from Kureeru/error-details
Browse files Browse the repository at this point in the history
add error class and details to APIError
  • Loading branch information
rbeuque74 authored Dec 9, 2021
2 parents 302dfc0 + 328ea21 commit 5bcee91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ovh/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import "fmt"

// APIError represents an error that can occurred while calling the API.
type APIError struct {
// Error class
Class string `json:"class,omitempty"`
// Error message.
Message string
Message string `json:"message"`
// Error details
Details map[string]string `json:"details,omitempty"`
// HTTP code.
Code int
// ID of the request
Expand Down

0 comments on commit 5bcee91

Please sign in to comment.