github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/api/cloudcontroller/ccerror/unknown_object_in_list_error.go (about)

     1  package ccerror
     2  
     3  import (
     4  	"fmt"
     5  	"reflect"
     6  )
     7  
     8  // UnknownObjectInListError is returned when iterating through a paginated
     9  // list. Assuming tests are written for the paginated function, this should be
    10  // impossible to get.
    11  type UnknownObjectInListError struct {
    12  	Expected   interface{}
    13  	Unexpected interface{}
    14  }
    15  
    16  func (e UnknownObjectInListError) Error() string {
    17  	return fmt.Sprintf(
    18  		"Error while processing a paginated list. Expected %s but %s was returned",
    19  		reflect.TypeOf(e.Expected),
    20  		reflect.TypeOf(e.Unexpected),
    21  	)
    22  }