refactor: adapt errors in apps
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user