pulumi/pkg/apitype/errors.go
Pat Gavlin a23b10a9bf
Update the copyright end date to 2018. (#1068)
Just what it says on the tin.
2018-03-21 12:43:21 -07:00

18 lines
455 B
Go

// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
package apitype
import "fmt"
// ErrorResponse is returned from the API when an actual response body is not appropriate. i.e.
// in all error situations.
type ErrorResponse struct {
Code int `json:"code"`
Message string `json:"message"`
}
// Error implements the Error interface.
func (err ErrorResponse) Error() string {
return fmt.Sprintf("[%d] %s", err.Code, err.Message)
}