File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ngx-fusio-sdk" ,
3
- "version" : " 6.0.6 " ,
3
+ "version" : " 6.0.7 " ,
4
4
"description" : " SDK to integrate Fusio into an Angular app" ,
5
5
"keywords" : [
6
6
" Fusio" ,
Original file line number Diff line number Diff line change 1
1
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" ;
4
3
import { Router } from "@angular/router" ;
5
4
import { UserService } from "../../service/user.service" ;
6
5
import { FusioService } from "../../service/fusio.service" ;
@@ -59,13 +58,13 @@ export class LoginComponent implements OnInit {
59
58
success : false ,
60
59
message : 'Could not authenticate' ,
61
60
} ;
62
- } else if ( axios . isAxiosError ( error ) && error . response ) {
61
+ } else if ( error instanceof CommonMessageException ) {
62
+ this . response = error ;
63
+ } else {
63
64
this . response = {
64
65
success : false ,
65
- message : error . response . data . error_description || 'An unknown error occurred' ,
66
+ message : String ( error ) ,
66
67
} ;
67
- } else {
68
- throw error ;
69
68
}
70
69
}
71
70
}
You can’t perform that action at this time.
0 commit comments