This is a targeted fix to a specific function called from a client app that is crashing while force-unwrapping gs_data, to throw an error instead of making the force-unwrap call. This could be generalized to other functions that also access data (which force unwraps gs_data).
Added a unit test point to reproduce the issue, and verify that it is resolved.
This is a targeted fix to a specific function called from a client app that is crashing while force-unwrapping gs_data, to throw an error instead of making the force-unwrap call. This could be generalized to other functions that also access data (which force unwraps gs_data).
Added a unit test point to reproduce the issue, and verify that it is resolved.
To verify the bug (crash in makeCodable):
Comment out lines 139-142, then uncomment line 137.
Run the unit test and verify that the unit test point fails.
Repeat, restoring lines 139-142, and commenting out line 137.
Run the unit test and verify that the unit test throws the specified error.