Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException #565

Closed
CoderNate opened this issue Jan 23, 2021 · 2 comments
Closed

NullReferenceException #565

CoderNate opened this issue Jan 23, 2021 · 2 comments
Assignees
Labels

Comments

@CoderNate
Copy link

if (settings.ProxyAndRecordSettings.SaveMapping)

I get a NullReferenceException here when a request fails due to mapping being null. It looks like calling proxyHelper.SendAsync returns null for a mapping if the status code was not successful. The next if statement right below this also has the same issue.

@StefH StefH self-assigned this Jan 24, 2021
@StefH StefH added the bug label Jan 24, 2021
@StefH
Copy link
Collaborator

StefH commented Jan 24, 2021

Hello @CoderNate ,

Thanks for the information.

However I think you mean that these line can fail:

 _options.Mappings.TryAdd(mapping.Guid, mapping);

// and

 _mappingToFileSaver.SaveMappingToFile(mapping);

Correct?

@CoderNate
Copy link
Author

Yes, that's right; my mistake. Thanks.
And hey cool project! Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants