diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-10-30 13:00:33 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-10-30 13:00:33 -0400 |
| commit | 75a457debc009e2be26ff503a2d4b657225ab8c9 (patch) | |
| tree | a3a51ba57fa9f2ed5669e97a4dfcb0ef74092ac2 /MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs | |
| parent | 8ea02ee02068f7e7361e143301b51ca57e45615a (diff) | |
update components
Diffstat (limited to 'MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs')
| -rw-r--r-- | MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs index c17a637fe..1176407ce 100644 --- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs +++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs @@ -8,8 +8,10 @@ using MediaBrowser.Model.Serialization; using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Model.Net; namespace MediaBrowser.Common.Implementations.Security { @@ -227,6 +229,16 @@ namespace MediaBrowser.Common.Implementations.Security SaveAppStoreInfo(parameters); throw; } + catch (HttpException e) + { + _logger.ErrorException("Error registering appstore purchase {0}", e, parameters ?? "NO PARMS SENT"); + + if (e.StatusCode.HasValue && e.StatusCode.Value == HttpStatusCode.PaymentRequired) + { + throw new PaymentRequiredException(); + } + throw new ApplicationException("Error registering store sale"); + } catch (Exception e) { _logger.ErrorException("Error registering appstore purchase {0}", e, parameters ?? "NO PARMS SENT"); |
