Skip to content
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

Wrong request URL when conversation is assigned with "withRunningAssignmentRules" parameter #404

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

feelbadinc
Copy link

Why?

The withRunningAssignmentRules parameter is supposed to append /run_assignment_rules to the URL but instead it appends /run_assignment_rules/parts. The API is throwing the 404 error when you attempt to send a request to this URL.

Intercom API doc article for the reference: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/Conversations/autoAssignConversation/

How?

In original code, the /parts string is being appended to the URL no matter the value of withRunningAssignmentRules variable. I moved the /parts string into the ternary expression so now it's appended only when withRunningAssignmentRules is false or undefined.

The "withRunningAssignmentRules" parameter is supposed to add "/run_assignment_rules" to the URL but instead it adds "/run_assignment_rules/parts". The API is throwing the 404 error when you attempt to send a request to this URL.
@feelbadinc feelbadinc marked this pull request as draft April 22, 2024 15:15
@feelbadinc feelbadinc changed the title Fix URL concat bug in conversation.ts Wrong request URL when conversation is assigned with "withRunningAssignmentRules" parameter Apr 22, 2024
@feelbadinc feelbadinc marked this pull request as ready for review April 22, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants