security(polymarket-browse): replace bare except: with specific exception handling #32
Reference in New Issue
Block a user
Delete Branch "security/9-bare-except"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Replace bare
except:clauses with specific exception handling to prevent swallowing critical errors.Changes
except:changed toexcept (ValueError, TypeError):ValueError: datetime.fromisoformat parse failureTypeError: input is not a string typeRationale
Bare
except:catches ALL exceptions includingKeyboardInterrupt,SystemExit, andMemoryError. This security fix ensures only expected parsing errors are caught.Testing
70/70 tests passing
Review requested
lgtm
Pull request closed