feat(AddAppConnection): show meaningful error messages only

This commit is contained in:
Ali BARIN
2024-09-24 14:38:38 +00:00
parent 589fe0f5f3
commit d6e78a48a0
3 changed files with 19 additions and 15 deletions

View File

@@ -10,8 +10,12 @@ export default function useVerifyConnection() {
);
return data;
} catch {
throw new Error('Failed while verifying connection!');
} catch (err) {
if (err.response.status === 500) {
throw new Error('Failed while verifying connection!');
}
throw err;
}
},
});