@angelmunoz content in the fediverse

Home
@alexzeitler@mastodon.social Ye...

@angelmunoz@misskey.cloud I was expecting someth...

@@angelmunoz...

@angelmunoz@misskey.cloud I was expecting something like this but it doesn't make sense to me because this makes building robust APIs unnecessarily hard. That way you can't send the client a useful error. They didn't have to throw an exception, they could just have null-ed the property in question. Having a null property could point the client towards the right direct while an null object leaves everybody in the dark.

@alexzeitler@mastodon.social Yeah I totally agree, I often prefer to just manually deserialize the body myself for such reasons which I guess falls into the "unnecessarily hard" category.

however, making the properties null would bring friction with F# records though, right? I can see myself getting null pointer exceptions because my non-optional property was actually null