feder-cr/Jobs_Applier_AI_Agent_AIHawk · error · RuntimeError
An unexpected error occurred while processing availability.
Error message
An unexpected error occurred while processing availability.
What it means
Generic RuntimeError wrapping any non-KeyError/TypeError/AttributeError failure during availability processing in JobApplicationProfile.__init__. Like its siblings, it fires when a nested validator raises something like ValueError, and the true error is only recoverable from the chained exception. Treat it as 'availability data failed an unanticipated check'.
Source
Thrown at src/resume_schemas/job_application_profile.py:152
raise RuntimeError("An unexpected error occurred while processing work_preferences.") from e
# Process availability
try:
logger.debug("Processing availability")
self.availability = Availability(**data['availability'])
logger.debug(f"Availability processed: {self.availability}")
except KeyError as e:
logger.error(f"Required field {e} is missing in availability data.")
raise KeyError(f"Required field {e} is missing in availability data.") from e
except TypeError as e:
logger.error(f"Error in availability data: {e}")
raise TypeError(f"Error in availability data: {e}") from e
except AttributeError as e:
logger.error(f"Attribute error in availability processing: {e}")
raise AttributeError("Attribute error in availability processing.") from e
except Exception as e:
logger.error(f"An unexpected error occurred while processing availability: {e}")
raise RuntimeError("An unexpected error occurred while processing availability.") from e
# Process salary_expectations
try:
logger.debug("Processing salary_expectations")
self.salary_expectations = SalaryExpectations(**data['salary_expectations'])
logger.debug(f"salary_expectations processed: {self.salary_expectations}")
except KeyError as e:
logger.error(f"Required field {e} is missing in salary_expectations data.")
raise KeyError(f"Required field {e} is missing in salary_expectations data.") from e
except TypeError as e:
logger.error(f"Error in salary_expectations data: {e}")
raise TypeError(f"Error in salary_expectations data: {e}") from e
except AttributeError as e:
logger.error(f"Attribute error in salary_expectations processing: {e}")
raise AttributeError("Attribute error in salary_expectations processing.") from e
except Exception as e:
logger.error(f"An unexpected error occurred while processing salary_expectations: {e}")
raise RuntimeError("An unexpected error occurred while processing salary_expectations.") from eView on GitHub (pinned to 79155b52fa)
Solutions
- Check e.__cause__ for the original exception and message.
- Reproduce by calling Availability(**data['availability']) with the same payload.
- Fix or normalize the failing value (e.g. standardize date strings), and add a specific except clause for the recurring exception type.
Example fix
# before
except Exception as e:
raise RuntimeError("An unexpected error occurred while processing availability.") from e
# after
except ValueError as e:
raise ValueError(f"Invalid availability data: {e}") from e
except Exception as e:
raise RuntimeError(f"Unexpected availability failure: {e!r}") from e Defensive patterns
Strategy: try-catch
Try / catch
try:
profile = JobApplicationProfile(**data)
except RuntimeError as e:
if 'availability' in str(e):
handle(e.__cause__) Prevention
- Normalize date strings before loading
- Keep chained exceptions for diagnostics
- Test nested validators with real data
When it happens
Trigger: Availability's nested date parsing or enum coercion raising ValueError during **-construction; any custom exception from subclassed models.
Common situations: Date strings in unexpected formats inside availability; library version adding stricter availability validation; locale-dependent date formats in resumes.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- An unexpected error occurred while processing self_identific
- An unexpected error occurred while processing legal_authoriz
- An unexpected error occurred while processing work_preferenc
- An unexpected error occurred while processing salary_expecta
- Attribute error in self_identification processing.
AI-assisted analysis of feder-cr/Jobs_Applier_AI_Agent_AIHawk@79155b52fa (2026-08-28).
Data as JSON: /api/errors/53f7709ccf6ea1fe.
Report an issue: GitHub.