Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
G
beasy-mobile
Commits
2e7293ca
Commit
2e7293ca
authored
May 28, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update error name to match general javascript errors
parent
f11d4387
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
orangePayment.ts
src/utils/requests/orangePayment.ts
+2
-2
No files found.
src/utils/requests/orangePayment.ts
View file @
2e7293ca
...
@@ -65,13 +65,13 @@ export const getTransactionStatus = async (orderId: string) => {
...
@@ -65,13 +65,13 @@ export const getTransactionStatus = async (orderId: string) => {
if
(
response
.
status
===
"INITIATED"
)
{
if
(
response
.
status
===
"INITIATED"
)
{
log
.
warn
(
"Payment is still in progress, throwing error for mutation to catch"
);
log
.
warn
(
"Payment is still in progress, throwing error for mutation to catch"
);
const
error
=
new
Error
(
"Payment is still in progress"
);
const
error
=
new
Error
(
"Payment is still in progress"
);
error
.
name
=
"
PaymentInProgress
"
;
error
.
name
=
"
ORANGE_PAYMENT_IN_PROGRESS
"
;
throw
error
;
throw
error
;
}
}
if
(
response
.
status
===
"FAILED"
)
{
if
(
response
.
status
===
"FAILED"
)
{
log
.
warn
(
"Payment failed, throwing error for mutation to catch"
);
log
.
warn
(
"Payment failed, throwing error for mutation to catch"
);
const
error
=
new
Error
(
"Payment failed"
);
const
error
=
new
Error
(
"Payment failed"
);
error
.
name
=
"
PaymentFailed
"
;
error
.
name
=
"
ORANGE_PAYMENT_FAILED
"
;
throw
error
;
throw
error
;
}
}
log
.
http
(
"getTransactionStatus |"
,
JSON
.
stringify
(
response
,
null
,
2
));
log
.
http
(
"getTransactionStatus |"
,
JSON
.
stringify
(
response
,
null
,
2
));
...
...
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