Saturday, May 26, 2012

Bug Explanation : Connection Error 400 in Blob

Some people has been complaining that Blob is giving a error in connection problem on trying to publish posts.
The error code 400 is returned when the server doesn't recognize the sent data.
It is a limitation of blogger server that it accepts data in only xml format which is quite strict in rules.
If you miss one slash, or forget to close one html tag, the whole request becomes invalid.
Whereas all other major APIs use json data, blogger keeps using this tedious and tricky method (one of the reason why there aren't many blogger clients)

Due to this problem, if you create a new post with simple html tags, blob will handle it fine, but there might be occasional problems while editing an existing post with complex tags..(more if you mess up the html tags)

I'll be looking into a way to validate the post before requesting, but that'd be complex..
In the meantime, if you get those errors, offline save the thing, then try removing some part of the post and online draft it, to check which part/html code is causing the error.

Sorry for the trouble and inconvenience, but this is Blogger's fault as much as mine.


1 comment:

  1. I'm sorry for the comment not related to your post, it seems I have gotten the solution. I'll try it right now and will post a feedback later. Thanks. :)