Skip to content

Commit

Permalink
fix: fix wrapping of k8s api messages
Browse files Browse the repository at this point in the history
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
  • Loading branch information
sleshchenko committed Oct 10, 2019
1 parent abfbf17 commit 16097e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/kube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ export class KubeHelper {
* @param e k8s error to wrap
*/
private wrapK8sClientError(e: any): Error {
if (e.body && e.body.message) return new Error(e.body.message)
if (e.response && e.response.body && e.response.body.message) return new Error(e.response.body.message)
else return new Error(e)
}
}
Expand Down

0 comments on commit 16097e7

Please sign in to comment.