// NewResourceError is just a helper to create a new `ResourceError` to return from custom calls, it's "cli-compatible".
NewResourceError is just a helper to create a new `ResourceError` to return from custom calls, it's "cli-compatible".
// NewResourceError is just a helper to create a new ` ResourceError ` to return from custom calls it ' s " cli - compatible " .
func NewResourceError(statusCode int, uri, method, body string) ResourceError {
	unescapedURI, _ := url.QueryUnescape(uri)
	return ResourceError{
		StatusCode: statusCode,
		URI:        unescapedURI,
		Method:     method,
		Body:       body,
	}
}
func NewResourceError ( statusCode int , uri , method , body string ) ResourceError { unescapedURI , _ := url . QueryUnescape ( uri ) return ResourceError { StatusCode : statusCode , URI : unescapedURI , Method : method , Body : body , } }
NewResourceError is just a helper to create a new `ResourceError` to return from custom calls, it's "cli-compatible".
NewResourceError is just a helper to create a new ` ResourceError ` to return from custom calls it ' s " cli - compatible " .