Conversation
❌ 1 Tests Failed:
View the full list of 2 ❄️ flaky tests
To view more test analytics, go to the Test Analytics Dashboard |
WilliamBergamin
left a comment
There was a problem hiding this comment.
I like this refactor, I believe it properly isolates the responsibility of apiCall and makeRequest, elegant fix 💯
But these changes affect a critical section of the web-api package (logic used by every user), this is why I left a comment highlighting the importance of properly scoping this PR
|
@WilliamBergamin Thanks so much for the review and excellent suggestions as always ✨ I updated the test changes to be more focused on the These changes are also tested to be working in production and development, with both standard API methods and |
WilliamBergamin
left a comment
There was a problem hiding this comment.
This looks good 💯 thanks for catching this 🥇
|
@WilliamBergamin Thanks once more for these reviews and improvements to testing in the meantime! I'll merge this now to follow up with a patch soon 🚢 💨 |
Summary
This PR fixes an issue where setting the
allowAbsoluteUrlsoption totruecauses thefilesUploadV2method to error!Some investigating points at the "https://files.slack.com/..." URL gathered to POST files to having a different base URL than other API request at "https://slack.com/api/..." 🤖
Preview
The changes of this PR make the following example upload as expected:
Notes
Changes were made to derive the absolute URL to use in requests before the internal
makeRequestfunction. This was done since both.apiCalland.filesUploadV2make requests using different URLs but the sameaxiosclient 👾Requirements