I live in Belgium and I had a bug when I use the getPushes method.
I always got the following error: {"Assert.Fail failed. 400 Bad Request - Usually this results from missing a required parameter."}
After some debugging I found that the Pushbullet API does not work with comma characters in the modified_after field. Since this field can be a double value, and in Belgium the default conversion of a double to a string contains a comma, I changed the double to string conversion code in the getPushes method.
Reproduction of the error:
Change your laptop's region setting to 'Dutch (Belgium)'
Use a non integer DateTime value (as I added in the unit test)
Execute the GetPushesAllSince unit test
You will get the error above
Done to fix the issue:
Changed the Culture of the conversion to InvariantCulture.
Hi,
I live in Belgium and I had a bug when I use the
getPushes
method. I always got the following error:{"Assert.Fail failed. 400 Bad Request - Usually this results from missing a required parameter."}
After some debugging I found that the Pushbullet API does not work with comma characters in the
modified_after
field. Since this field can be a double value, and in Belgium the default conversion of a double to a string contains a comma, I changed the double to string conversion code in the getPushes method.Reproduction of the error:
GetPushesAllSince
unit testDone to fix the issue: Changed the Culture of the conversion to InvariantCulture.
Kind regards, Dries