#so a sortBy Parameter is returning a 500 internal server error on postman

1 messages · Page 1 of 1 (latest)

fast crescent
#

When a blank space is input and sent for a sortBy parameter. I get the correct 200 response when a valid input is sent. I can’t put a catch block on the controller. Any ideas ?

humble forgeBOT
#

<@&987246399047479336> please have a look, thanks.

humble forgeBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

fast crescent
#

Sorry I don’t get you

#

Can you ask that in a different way

vale valley
#

the error 500 must come from somewhere right ?

#

do you get an exception which is causing this error 500 ?

fast crescent
#

Ah I imagine that’s a httpStatus ?

vale valley
#

yes

#

500 is a http status

fast crescent
#

Internal server error it’s a generic vague one

vale valley
#

yes, that's the point of 500

#

it usually happens if you have an exception happening in your server

#

so check your server and see if you have an exception

#

in the log

fast crescent
#

Yeah

#

I’m trying to remember the error I was told it was

#

It’s when a object isn’t pointed to anything

#

And isn’t initialised

vale valley
#

?

#

error 500 means an exception happened in your server

#

so check your logs please

#

and see the exception here

fast crescent
#

Not on that laptop now

vale valley
#

then go on laptop

fast crescent
#

Can we put this on ice

#

Hahah

gloomy garnet
fast crescent
#

Yes

#

Yes

#

That’s it

vale valley
fast crescent
#

Does nullpointerexception help ?

vale valley
#

do you know that you have a NPE now ?

fast crescent
#

What’s that

vale valley
#

NullPointerException

fast crescent
#

Joke joke

#

Yeah

vale valley
#

how do you know that you have a NPE ?

fast crescent
#

That’s the exception the 500 is referring to

#

It was in the logs

vale valley
#

ah so you checked the logs ?

#

ah

fast crescent
#

This is all from earlier today

vale valley
#

please show the exception

fast crescent
#

I’m typing on my phone

#

I just thought I would try and get a different direction to go in the morning

#

And it was playing on my mind

#

So thought I would ask you lot if anything seemed obvious

gloomy garnet
fast crescent
#

All I do is put a httpStatus(bad_request) into the controller ?

gloomy garnet
#

and changing it's returning type to a ResponseEntity (and the syntax you showed is not right, but you got the point)

#

wait, is it spring? (I assumed it's spring)

fast crescent
#

Sry sry I’m running on fumes

#

Yeah

#

Boot

#

Guys I’ll come back here in the morning

fast crescent
#

Hey

#

So is anyone here

#

To help walk me through solving this

tranquil kindle
#

what remains unclear after the above discussion?

fast crescent
#

The solution isn’t correct for my purpose

#

I’ve run it past people here

#

I’ve been given a different direction to try

#

If I still can’t solve it I’ll be back 👍

tranquil kindle
#

alright 🙂

fast crescent
#

Ok I got it working, your guys solution wasn’t correct for my needs if anybody is arsed message me and I’ll walkthrough what I done