Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
3f1423e7
Commit
3f1423e7
authored
Jun 29, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve error handling
parent
152d31ba
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
13 deletions
+60
-13
login.component.ts
Breeze.UI/src/app/login/login.component.ts
+12
-2
create.component.ts
Breeze.UI/src/app/setup/create/create.component.ts
+6
-1
recover.component.ts
Breeze.UI/src/app/setup/recover/recover.component.ts
+6
-1
dashboard.component.ts
Breeze.UI/src/app/wallet/dashboard/dashboard.component.ts
+12
-2
history.component.ts
Breeze.UI/src/app/wallet/history/history.component.ts
+6
-1
receive.component.ts
Breeze.UI/src/app/wallet/receive/receive.component.ts
+9
-3
send.component.ts
Breeze.UI/src/app/wallet/send/send.component.ts
+9
-3
No files found.
Breeze.UI/src/app/login/login.component.ts
View file @
3f1423e7
...
...
@@ -107,7 +107,12 @@ export class LoginComponent implements OnInit {
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
alert
(
error
);
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
else
{
alert
(
error
.
json
().
errors
[
0
].
message
);
}
}
}
)
...
...
@@ -128,7 +133,12 @@ export class LoginComponent implements OnInit {
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
alert
(
error
);
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
else
{
alert
(
error
.
json
().
errors
[
0
].
message
);
}
}
}
)
...
...
Breeze.UI/src/app/setup/create/create.component.ts
View file @
3f1423e7
...
...
@@ -101,7 +101,12 @@ export class CreateComponent {
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
alert
(
error
);
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
else
{
alert
(
error
.
json
().
errors
[
0
].
message
);
}
}
}
)
...
...
Breeze.UI/src/app/setup/recover/recover.component.ts
View file @
3f1423e7
...
...
@@ -115,7 +115,12 @@ export class RecoverComponent implements OnInit {
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
alert
(
error
);
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
else
{
alert
(
error
.
json
().
errors
[
0
].
message
);
}
}
}
);
...
...
Breeze.UI/src/app/wallet/dashboard/dashboard.component.ts
View file @
3f1423e7
...
...
@@ -60,7 +60,12 @@ export class DashboardComponent {
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
alert
(
error
);
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
else
{
alert
(
error
.
json
().
errors
[
0
].
message
);
}
}
}
)
...
...
@@ -82,7 +87,12 @@ export class DashboardComponent {
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
alert
(
error
);
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
else
{
alert
(
error
.
json
().
errors
[
0
].
message
);
}
}
}
)
...
...
Breeze.UI/src/app/wallet/history/history.component.ts
View file @
3f1423e7
...
...
@@ -44,7 +44,12 @@ export class HistoryComponent {
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
alert
(
error
);
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
else
{
alert
(
error
.
json
().
errors
[
0
].
message
);
}
}
}
)
...
...
Breeze.UI/src/app/wallet/receive/receive.component.ts
View file @
3f1423e7
...
...
@@ -33,9 +33,15 @@ export class ReceiveComponent {
}
},
error
=>
{
if
(
error
.
status
>=
400
)
{
this
.
errorMessage
=
<
any
>
error
;
console
.
log
(
this
.
errorMessage
);
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
else
{
alert
(
error
.
json
().
errors
[
0
].
message
);
}
}
}
)
...
...
Breeze.UI/src/app/wallet/send/send.component.ts
View file @
3f1423e7
...
...
@@ -132,9 +132,15 @@ export class SendComponent {
}
},
error
=>
{
if
(
error
.
status
>=
400
)
{
this
.
errorMessage
=
error
;
console
.
log
(
this
.
errorMessage
);
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
else
{
alert
(
error
.
json
().
errors
[
0
].
message
);
}
}
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment