Unknown error (404) when sending message with question mark at the end #113
Comments
Hi Łukasz, What platform are you seeing this on? Thanks, |
I am using my local machine (Macbook) and compiling project with Swift 3.
When I change |
I ran into this same issue this week as well, and traced it down to the presence of a question mark in a query parameter for a URL that I was including as an attachment on a message. I reached out to slack's support team, who said the following:
|
I was under the impression that using https://github.com/SlackKit/SKWebAPI/blob/master/Sources/NetworkInterface.swift#L45 |
@pvzig Here's what I'm seeing as the output of the generated request:
Looks like everything is being encoded except the question mark. I'm not immediately sure what the right approach is (as I've typically just used (Also, note this output is from the last 3.x release of the library. I'm in the process of updating to 4.x now.) |
FYI - I'm digging into this a bit this morning and will plan on getting a PR together for you to take a look at. |
Thanks John, appreciate it! |
@pvzig I was able to find an open radar report discussing this same thing related to |
This should be fixed with the 4.0.7 release of SKWebAPI. Rebuilding SlackKit should get you the latest. Let me know if you continue having issues after updating. |
When trying to send message (
bot.webApi?.sendMessage()
) with text that has question mark (?) I get failure withunknownError
type. When I removed this question mark my message got through. I think there is something wrong with escaping this sign from request url and it's messing with url query.The text was updated successfully, but these errors were encountered: