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

showing an exception on POST call of an endpoint in after-Subscriptions code repo #3

Open
tutul2010 opened this issue Sep 6, 2023 · 0 comments

Comments

@tutul2010
Copy link

HI ,
I tried to call endpoints in Post call with below request load and popup a runtime error as "System.NullReferenceException: Object reference not set to an instance of an object. at Subscriptions.Domain.Customer.AddSubscription(Product product, ISubscriptionAmountCalculator subscriptionAmountCalculator) in D:\learning\ddd_sample\Subscriptions-DDD\Subscriptions\Domain\Customer.cs:line 36"

Endpoints - https://localhost:5001/subscriptions
Verb- Post
Request payload(as json) -
{
"CustomerId": "4D2ECE0D-4CDC-4CDC-8315-53AB89B4F05D",
"ProductId": "7D037E64-53AA-4BC3-BAF1-F8480F585969"
}
Below attached error runtime exception as below,
image

Can you please help me to fix it on after code repo ?

Thanks,

@tutul2010 tutul2010 changed the title showing an exception on POST call of a endpoint in after-Subscriptions code repo showing an exception on POST call of an endpoint in after-Subscriptions code repo Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant