Package: ec2query

import "../ibm-cos-sdk-go-v2/aws/protocol/ec2query"

Type Summary collapse

Function Summary collapse

Type Details

ErrorComponents struct

ErrorComponents represents the error response fields that will be deserialized from a ec2query error response body

Structure Fields:

Code string
Message string
RequestID string

Function Details

func GetErrorResponseComponents(r io.Reader) (ErrorComponents, error)

GetErrorResponseComponents returns the error components from a ec2query error response body



17
18
19
20
21
22
23
// File 'aws/protocol/ec2query/error_utils.go', line 17

func GetErrorResponseComponents(r io.Reader) (ErrorComponents, error) { var er ErrorComponents if err := xml.NewDecoder(r).Decode(&er); err != nil && err != io.EOF { return ErrorComponents{}, fmt.Errorf("error while fetching xml error response code: %w", err) } return er, nil }