refactor: adapt errors in apps

This commit is contained in:
Ali BARIN
2022-11-06 18:55:38 +01:00
committed by Faruk AYDIN
parent 5df7867b6d
commit ad46b3eea3
6 changed files with 80 additions and 104 deletions

View File

@@ -1,15 +1,11 @@
import { IGlobalVariable } from '@automatisch/types';
const verifyCredentials = async ($: IGlobalVariable) => {
try {
await $.http.get('/2010-04-01/Accounts.json?PageSize=1');
await $.http.get('/2010-04-01/Accounts.json?PageSize=1');
await $.auth.set({
screenName: $.auth.data.accountSid,
});
} catch (error) {
throw new Error(JSON.stringify(error.response.data));
}
await $.auth.set({
screenName: $.auth.data.accountSid,
});
};
export default verifyCredentials;