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
1912d793
Commit
1912d793
authored
May 28, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating the name property of known error for specific handling
parent
eab0abf3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
orangePayment.ts
src/utils/requests/orangePayment.ts
+9
-1
No files found.
src/utils/requests/orangePayment.ts
View file @
1912d793
...
...
@@ -64,7 +64,15 @@ export const getTransactionStatus = async (orderId: string) => {
log
.
http
(
"getTransactionStatus |"
,
JSON
.
stringify
(
response
,
null
,
2
));
if
(
response
.
status
===
"INITIATED"
)
{
log
.
warn
(
"Payment is still in progress, throwing error for mutation to catch"
);
throw
new
Error
(
"Payment is still in progress"
);
const
error
=
new
Error
(
"Payment is still in progress"
);
error
.
name
=
"PaymentInProgress"
;
throw
error
;
}
if
(
response
.
status
===
"FAILED"
)
{
log
.
warn
(
"Payment failed, throwing error for mutation to catch"
);
const
error
=
new
Error
(
"Payment failed"
);
error
.
name
=
"PaymentFailed"
;
throw
error
;
}
log
.
http
(
"getTransactionStatus |"
,
JSON
.
stringify
(
response
,
null
,
2
));
return
response
;
...
...
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