Next.js Discord

Discord Forum

AxiosError message: 'Request failed with status code 500'

Unanswered
English Angora posted this in #help-forum
Open in Discord
Original message was deleted.

18 Replies

Avatar
joulev
You can console.log the error to know what it is, then fix it
Avatar
English Angora
Hey @joulev thanks for you answer, where do you mean, I should place the console.log? Please elaborate. Thank you!
Avatar
joulev
inside the catch (error) {} block, console.log to see what error it is
Avatar
English Angora
Thank you, of course! I will try this, merci-beacoup!
Avatar
joulev
sure, good luck
Avatar
English Angora
Hey @joulev , so the form is on '/thing/post' and then onSubmit its being send with Axios to '/thing/create'.. Should they both be the same url, as in folder structure, if you know what I mean? Maybe this could be the problem?.
Avatar
joulev
no i don't really understand what you mean...
what was the error
Avatar
English Angora
I am sorry, I will explain better.. My english isn't that good.
Uhm, error wasn't being shown in console.log, could that mean something?..
Only the inputted data of the form in json was console.logged with 'console.log(values)'.
I am showing you screenshots, that's easier.
Avatar
joulev
hmm sure
Avatar
English Angora
@joulev
Avatar
joulev
nothing wrong with what i see here
Avatar
English Angora
Hmm, okay, thank you, sir..
It's so unfortunate, that this status code 500, isn't specific.. it's so generic.
I don't know what's wrong, lol.. I mean, it's def. a server side problem, i just don't understand what or why..