[OAuthHandler] Assume format=json by default, fix upload-by-API
[OAuthHandler] Catch failure to authenticate