Click here to Skip to main content
15,897,291 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: Question on 404 (not technical, I just want opinions) Pin
Sander Rossel21-Feb-18 8:37
professionalSander Rossel21-Feb-18 8:37 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
John Bevan21-Feb-18 21:25
John Bevan21-Feb-18 21:25 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
11917640 Member 24-Feb-18 19:10
11917640 Member 24-Feb-18 19:10 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Chris Maunder21-Feb-18 1:02
cofounderChris Maunder21-Feb-18 1:02 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
MadMyche21-Feb-18 4:46
professionalMadMyche21-Feb-18 4:46 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Sander Rossel21-Feb-18 8:35
professionalSander Rossel21-Feb-18 8:35 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Bajaja21-Feb-18 20:53
professionalBajaja21-Feb-18 20:53 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
John Bevan21-Feb-18 21:19
John Bevan21-Feb-18 21:19 
I agree that 404 seems wrong in the sense that the service has been found; it's just the data's not there.

Taking a quick look on SO it seems 204 is the most popular choice of code for where the service is found, but there's no data: rest - HTTP status code for "no data available" from an external datasource - Stack Overflow[^].

A 200 with empty result set makes sense if you're returning a list in some contexts; e.g. if I want all students attending a course and provide a valid id for the course but there are no students allocated, I'd want an empty list. If the course id was invalid I'd want an HTTP error (probably 204 as per SO link above).

If searching for a single item and it's not found, a 204 makes sense (i.e. presumably I'm searching by ID / some unique field as I know that I only expect a single item, so I'm expecting that single item to exist; thus it's an error if it does not).
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
maze321-Feb-18 23:27
professionalmaze321-Feb-18 23:27 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
ScottM121-Feb-18 23:58
ScottM121-Feb-18 23:58 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Peter Shaw21-Feb-18 23:58
professionalPeter Shaw21-Feb-18 23:58 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Greg Bair22-Feb-18 2:26
professionalGreg Bair22-Feb-18 2:26 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Bruce Patin22-Feb-18 3:41
Bruce Patin22-Feb-18 3:41 
AnswerRe: Question on 404 (not technical, I just want opinions) Pin
DaveArel22-Feb-18 4:35
DaveArel22-Feb-18 4:35 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Dar Brett22-Feb-18 4:50
Dar Brett22-Feb-18 4:50 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Kirk 1038982122-Feb-18 8:50
Kirk 1038982122-Feb-18 8:50 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
jschell23-Feb-18 12:50
jschell23-Feb-18 12:50 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
Dimitrios Kalemis25-Feb-18 2:14
Dimitrios Kalemis25-Feb-18 2:14 
GeneralRe: Question on 404 (not technical, I just want opinions) Pin
RandyBuchholz27-Feb-18 11:05
RandyBuchholz27-Feb-18 11:05 
GeneralQuestion For The Brits Out There Pin
Kevin Marois20-Feb-18 8:29
professionalKevin Marois20-Feb-18 8:29 
GeneralRe: Question For The Brits Out There PinPopular
CodeWraith20-Feb-18 8:44
CodeWraith20-Feb-18 8:44 
GeneralRe: Question For The Brits Out There PinPopular
DRHuff20-Feb-18 9:12
DRHuff20-Feb-18 9:12 
GeneralRe: Question For The Brits Out There Pin
den2k8820-Feb-18 21:46
professionalden2k8820-Feb-18 21:46 
GeneralRe: Question For The Brits Out There Pin
A_Griffin20-Feb-18 8:46
A_Griffin20-Feb-18 8:46 
GeneralRe: Question For The Brits Out There Pin
Slacker00720-Feb-18 9:16
professionalSlacker00720-Feb-18 9:16 

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.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   27 votes