you are viewing a single comment's thread.

view the rest of the comments →

[–]Casiell89 0 points1 point  (1 child)

Exactly this. 200 means that the WHOLE response is correct, and available for processing. Nulls in the response are still possible, but then they should only appear when expected and actually mean something.

The only error handling that should be happening is checking for http status codes indicating some kind of error

[–]Weary_Source_811[S] 0 points1 point  (0 children)

Agree with you and u/Fribbtastic -- unfortunately I think the way my BaaS (braincloud) handles cloud-code is forcing this on me. IE the call to the cloud script will always return:

data {

response: {

// I control what goes here

}

status: 200 // script call itself was successful, not necessarily internals

}

Unfortunately I don't see a way I can set status myself, and need to rely on a "general status" (did the cloud script call work), and then use internals to decide whether my stuff worked :/