pull down to refresh

it pointed out all the deficiencies in my code
The first complaint looks valid but really poorly addressed by the digital overlord - I don't know the codebase but in general this is something that human review may have flagged up too. I saw your comment "this never happens", but that makes it all the more important to fix the code.
Think of it this way: if a field is never undefined because it is always set on every possible code path, then you shouldn't put a default but instead do error handling (and logging!) when encountering undefined. Assigning a default value on a case that should not exist is a problem because if for any reason (in the future) it does exist, it shouldn't just gracefully apply your assumption. Assigning a default value is what leads to hidden tech debt in this case, because it will mask future errors.
Maybe this is where my inexperience as a real developer starts to show.
My thought process was: If there was an edge case I didn't think about, I'd rather the app just proceed on, with a slightly messed up carousel order, than for it to error out. Happy to be corrected as to what k00b and ek think the standards should be in this case.
reply
30 sats \ 1 reply \ @optimism 5h
You're not wrong in wanting to prevent edge cases. But handling an error and erroring out are two different things. The later specifically means that an error isn't handled.
reply
Understood 🫡👍
reply