#Magic Mage

1 messages ยท Page 1 of 1 (latest)

glacial minnowBOT
mystic lodge
#

Alright, let's take a look. I want to tackle this one problem at a time thought, so let's start with the 500 error. Do you have a screenshot of this error?

ebon star
#

sadly it redirects the edit page to the main page before I get the chance to screenshot it for some reason, but it might be possible that the error could be somewhere in my code and I just need to put breakpoints on it to check why it is happening.

#

Ah it seems to be erroring in my code when it calls into it on on "form submit" in the first line on my edit-subscription api.

mystic lodge
#

Okay, so the form is triggering something that's causing a 500 error. That's a good starting place. Have you tried taking a video of it, so you can pause the video on where the error is happening and debug from there?

ebon star
#

It might be because now I have to json serialize 2 int values into the body and then the apis use JObject to get the values.

#

hmm interesting the json values is good, it seems to be ef6 that is having issues.

mystic lodge
#

It sounds like you have a good jumping off thing to tackle. I would recommend fixing that first and foremost so that you can rule it out as the cause for the subscription downgrade behavior

ebon star
#

Exception thrown: 'System.NotSupportedException' in EntityFramework.SqlServer.dll
For some reason it failed to translate this to sql:

var account = this.db.Accounts.FirstOrDefault(account => account.Id.Equals(accountId));
#

๐Ÿ˜…

mystic lodge
#

Well there's your problem right there!

ebon star
#

yep it looks like it.

glacial minnowBOT
ebon star
#

Ah I accidentally used the wrong property.

#

I used Id instead of AccountId

mystic lodge
#

Ahhh, yup. That'll do it. Is the error gone now?

ebon star
#

for some reason it did not fix it ๐Ÿค”.

neon bough
#

HI ๐Ÿ‘‹

What is the issue here with respect to Stripe APIs? I'm not clear on that bit.

ebon star
#

at first I thought it could have been some sort of silent stripe api error that was not listed in the dashboard but it seems to be something caused by ef6.

#

Ah, it does not like that I inlined the newtonsoft .Value<int>() inside of the FirstOrDefault()

#

And with that it is now fixed ๐Ÿ˜….

neon bough
#

Hooray ๐ŸŽ‰

ebon star
#

oh nice it seems to have changed it, but seems that the updated event never went out for when I updated the subscription's price object.

#

It shows it in the dashboard though

neon bough
#

I'm still unclear on what changed or what "went out"

ebon star
#

hmm I see

#

hmm I think I see the problem

#

looks like it auto disconnected the stripe cli webhook listening despite the fact the program was still running.

neon bough
#

Ah yeah, the CLI forwarding can sometimes disconnect due to network hiccups that most programs don't notice

ebon star
#

hmm

#

perhaps there should be a way for it to fix itself without restarting the cli itself.