Support HTTP 400 Bad Request

This commit is contained in:
Adam Harvey
2021-01-14 01:01:37 -05:00
parent a87014886a
commit a1f587c861
2 changed files with 3 additions and 0 deletions
@@ -74,6 +74,8 @@ function fetchResultsToResponseWrapper(
const statusCodeToErrorType = (statusCode: number): KubernetesErrorTypes => {
switch (statusCode) {
case 400:
return 'BAD_REQUEST';
case 401:
return 'UNAUTHORIZED_ERROR';
case 500:
@@ -135,6 +135,7 @@ export interface KubernetesClustersSupplier {
}
export type KubernetesErrorTypes =
| 'BAD_REQUEST'
| 'UNAUTHORIZED_ERROR'
| 'SYSTEM_ERROR'
| 'UNKNOWN_ERROR';