Skip to content

Commit 9e6b013

Browse files
committed
remove axios
1 parent d68c1b6 commit 9e6b013

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

projects/fusio-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-fusio-sdk",
3-
"version": "6.0.6",
3+
"version": "6.0.7",
44
"description": "SDK to integrate Fusio into an Angular app",
55
"keywords": [
66
"Fusio",

projects/fusio-sdk/src/lib/component/login/login.component.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {Component, OnInit} from '@angular/core';
2-
import {CommonMessage, ConsumerIdentity} from "fusio-sdk";
3-
import axios from "axios";
2+
import {CommonMessage, CommonMessageException, ConsumerIdentity} from "fusio-sdk";
43
import {Router} from "@angular/router";
54
import {UserService} from "../../service/user.service";
65
import {FusioService} from "../../service/fusio.service";
@@ -59,13 +58,13 @@ export class LoginComponent implements OnInit {
5958
success: false,
6059
message: 'Could not authenticate',
6160
};
62-
} else if (axios.isAxiosError(error) && error.response) {
61+
} else if (error instanceof CommonMessageException) {
62+
this.response = error;
63+
} else {
6364
this.response = {
6465
success: false,
65-
message: error.response.data.error_description || 'An unknown error occurred',
66+
message: String(error),
6667
};
67-
} else {
68-
throw error;
6968
}
7069
}
7170
}

0 commit comments

Comments
 (0)