loading...

Discussion on: Fragile Code

Collapse
kantord profile image
Daniel Kantor

What makes you think your code is fragile?

Collapse
talancid profile image
TalanCid Author

I'm not sure actually. I call out to an API that returns a result - whether good or bad, and I react with Good continuing what its doing, otherwise, it results in exceptions being thrown. Depending on where the exception happens, the user will either get the exception thrown to them or the resulting data will contain the elements and which ones were errors.

I feel like I could call this improperly and not get a result, but constantly get a crash/exception thrown. Maybe its because its open and not locked down to something specific? I'm only expecting certain things for the user to pass in. If they don't pass in at least the minimum results, they'll get an exception.

Maybe that's it, maybe I'm not checking more thoroughly what they're sending in to verify it can be processed.