-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: endpoints returning status code 500 #501
base: staging
Are you sure you want to change the base?
Conversation
@@ -124,7 +124,7 @@ export class OrdersController { | |||
streamUpdates: true | |||
} | |||
return await lastValueFrom<ResponseWithStatus>( | |||
this.ordersClient.send(QUEUE_MESSAGE.UPDATE_ORDER_STATUS, payload).pipe( | |||
this.ordersClient.emit(QUEUE_MESSAGE.UPDATE_ORDER_STATUS, payload).pipe( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect. Send is the correct method. refer to line 69
in order-service.controller.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
send
returns 500.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even so but that doesnt solve the underlying issue. Check if anything is getting returned
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please learn to look at for root cause when debugging. If something doesnt make sense and it works, there is something definitely wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The request body still reaches the orders controller if send
or emit
is used. The error is only thrown from the admin gateway.
Tested with and without the
lastValueFrom
observable
@@ -123,6 +123,7 @@ export class OrdersController { | |||
...data, | |||
streamUpdates: true | |||
} | |||
console.log(payload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done @siradji
What kind of PR is this?:
/kind fix
What this PR does / why we need it:
Fixes a couple of endpoints in the admin gateway, returning status code 500.
Which issue(s) does this PR fixes?:
Fixes #
Additional comments?:
Developer Checklist: