/// <summary> /// Exception thrown when Steam encounters an error while attempting to execute a request. /// </summary> /// <param name="message">Exception message</param> /// <param name="response">Response received from Steam which is either in an error state or delivered data which is in error.</param> public SteamRequestException( string message, ISteamResponse response ) : base(message) { ProcessResponse( response ); }
private void ProcessResponse( ISteamResponse response ) { Response = response; StatusCode = response.StatusCode; this.Data.Add( "HttpErrorMessage", Response.ErrorMessage ); this.Data.Add( "HttpStatusDescription", Response.StatusDescription ); this.Data.Add( "HttpStatusCode", StatusCode ); if( !response.IsSuccessful ) { RequestErrorMessage = response.ErrorMessage; if( response.ErrorException != null ) InnerException = response.ErrorException; } }