gracefully surface FetchErrors
Signed-off-by: Jamie Klassen <jklassen@vmware.com>
This commit is contained in:
@@ -223,12 +223,21 @@ export interface PodStatusFetchResponse {
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface KubernetesFetchError {
|
||||
export type KubernetesFetchError = StatusError | RawFetchError;
|
||||
|
||||
/** @public */
|
||||
export interface StatusError {
|
||||
errorType: KubernetesErrorTypes;
|
||||
statusCode?: number;
|
||||
resourcePath?: string;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface RawFetchError {
|
||||
errorType: 'FETCH_ERROR';
|
||||
message: string;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export type KubernetesErrorTypes =
|
||||
| 'BAD_REQUEST'
|
||||
|
||||
Reference in New Issue
Block a user