func APIErrors(err error) (transport.APIErrors, error) {
	if err == nil {
		return nil, nil
	}
	if IsAPIErrors(err) {
		return err.(transport.APIErrors), nil
	}
	return nil, errors.Annotatef(err, "not valid APIErrors")
}
// APIErrors extracts a slice of API errors from the given error or returns an
// error.
APIErrors extracts a slice of API errors from the given error or returns an
error.
// APIErrors extracts a slice of API errors from the given error or returns an // error .
func APIErrors(err error) (transport.APIErrors, error) {
	if err == nil {
		return nil, nil
	}
	if IsAPIErrors(err) {
		return err.(transport.APIErrors), nil
	}
	return nil, errors.Annotatef(err, "not valid APIErrors")
}
func APIErrors ( err error ) ( transport . APIErrors , error ) { if err == nil { return nil , nil } if IsAPIErrors ( err ) { return err . ( transport . APIErrors ) , nil } return nil , errors . Annotatef ( err , " " ) }
APIErrors extracts a slice of API errors from the given error or returns an
error.
APIErrors extracts a slice of API errors from the given error or returns an error .