Click here to Skip to main content
15,911,789 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: FCC / ISP Complaint / Worth It ? Pin
RJOberg21-Feb-18 5:04
professionalRJOberg21-Feb-18 5:04 
JokeFired? Are you sure? Pin
Kornfeld Eliyahu Peter20-Feb-18 20:44
professionalKornfeld Eliyahu Peter20-Feb-18 20:44 
GeneralRe: Fired? Are you sure? Pin
glennPattonWork320-Feb-18 21:24
professionalglennPattonWork320-Feb-18 21:24 
GeneralRe: Fired? Are you sure? Pin
Tim Carmichael21-Feb-18 0:25
Tim Carmichael21-Feb-18 0:25 
JokeDignity... Pin
Kornfeld Eliyahu Peter20-Feb-18 20:38
professionalKornfeld Eliyahu Peter20-Feb-18 20:38 
GeneralRe: Dignity... Pin
den2k8820-Feb-18 21:44
professionalden2k8820-Feb-18 21:44 
GeneralRe: Dignity... Pin
CodeWraith20-Feb-18 22:50
CodeWraith20-Feb-18 22:50 
GeneralQuestion on 404 (not technical, I just want opinions) Pin
Sander Rossel20-Feb-18 19:59
professionalSander Rossel20-Feb-18 19:59 
I'm wondering, what are your opinions on this.
My current employer uses 404 in web services when some entity cannot be found.
For example, let's say we're trying to get product x, but x does not exist.
Personally, I'd opt for a 200 with an empty response (or a response with a "product could not be found" error).
But here, they return a 404.

Why am I against returning a 404?
Because the server exists, the URL exists, the web service exists, so technically everything was found.
According to Wikipedia "The website hosting server will typically generate a "404 Not Found" web page when a user attempts to follow a broken or dead link;", but the link isn't broken!
I've ran into trouble because I don't want to throw an exception on 404, but I never know if some service could not be reached or if an invalid entity was requested.
In one case I returned the error "Product x could not be found" to a front-end, while in reality the configuration was wrong and the URL to the web service was broken.
I'd understand this on a website, where you browse to mydomain.com/product/x, but a web service?

So... Opinions?
Do you use 404 to indicate that some object could not be found (in a web service)?
I get that we did not find product x, but there must be a better way to separate functional from technical error...
How do you handle this?

GeneralRe: Question on 404 (not technical, I just want opinions) Pin
OriginalGriff20-Feb-18 20:11
mveOriginalGriff20-Feb-18 20:11 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
den2k8820-Feb-18 21:45
professionalden2k8820-Feb-18 21:45 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
OriginalGriff20-Feb-18 20:30
mveOriginalGriff20-Feb-18 20:30 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Sander Rossel20-Feb-18 21:47
professionalSander Rossel20-Feb-18 21:47 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
W Balboos, GHB22-Feb-18 7:26
W Balboos, GHB22-Feb-18 7:26 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Kornfeld Eliyahu Peter20-Feb-18 20:37
professionalKornfeld Eliyahu Peter20-Feb-18 20:37 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
lmoelleb20-Feb-18 20:45
lmoelleb20-Feb-18 20:45 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Sander Rossel20-Feb-18 21:51
professionalSander Rossel20-Feb-18 21:51 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
lmoelleb20-Feb-18 21:57
lmoelleb20-Feb-18 21:57 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
GuyThiebaut20-Feb-18 21:07
professionalGuyThiebaut20-Feb-18 21:07 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
GKP199220-Feb-18 21:11
professionalGKP199220-Feb-18 21:11 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Jörgen Andersson20-Feb-18 22:03
professionalJörgen Andersson20-Feb-18 22:03 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
F-ES Sitecore20-Feb-18 22:45
professionalF-ES Sitecore20-Feb-18 22:45 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Sander Rossel20-Feb-18 23:59
professionalSander Rossel20-Feb-18 23:59 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
MadMyche21-Feb-18 4:59
professionalMadMyche21-Feb-18 4:59 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
11917640 Member 20-Feb-18 23:10
11917640 Member 20-Feb-18 23:10 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Sander Rossel21-Feb-18 0:00
professionalSander Rossel21-Feb-18 0:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.