Add ServerTransferringException, use is_null

This commit is contained in:
Matthew Penner 2020-12-17 10:34:26 -07:00
parent 5668a780e2
commit fd848985ee
9 changed files with 36 additions and 14 deletions

View file

@ -66,7 +66,7 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>)
getServer(match.params.id)
.catch(error => {
if (error.response?.status === 409) {
if (error.response.data?.errors[0]?.detail?.includes('transfer')) {
if (error.response.data?.errors[0]?.code === 'ServerTransferringException') {
setTransferring(true);
} else {
setInstalling(true);