After upgrading iPhone to iOS 5.1 you get an error "an unknown error occurred" when you try to update an application.
This happens because before you update your iPhone, the password of your AppleID was shorter than required in the new version iOS 5.1
In this version the required password must be at least 8 characters long and complex.
Reset your AppleID password wait 2-3 minutes and try to update your apps again.
Please Donate if you find this article useful, just to keep this site alive!