Fix JSONDecodeError crash in config flow direction step#3
Fix JSONDecodeError crash in config flow direction step#3google-labs-jules[bot] wants to merge 3 commits intomainfrom
Conversation
Wraps API calls for fetching directions in a try-except block to catch `json.JSONDecodeError` and `aiohttp.ClientError`. Redirects user to the stop selection step with an error message instead of crashing. - Added `json` and `ClientError` imports. - Updated `async_step_stop` to accept `errors`. - Updated `async_step_direction` to handle exceptions. - Added translation keys for error message in EN and FR.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Changed Files
|
Wraps API calls for fetching directions in a try-except block to catch `json.JSONDecodeError` and `aiohttp.ClientError`. Redirects user to the stop selection step with an error message instead of crashing. Also renames the integration to "IDFM Custom" in metadata files. - Added `json` and `ClientError` imports. - Updated `async_step_stop` to accept `errors`. - Updated `async_step_direction` to handle exceptions. - Added translation keys for error message in EN and FR. - Updated `hacs.json` and `manifest.json` with new name "IDFM Custom".
Wraps API calls in config flow to catch JSONDecodeError and ClientError, allowing retry. Updates manifest.json with new code owner (@azman0101) and repository links for the fork. - Config flow: Handle exceptions during direction fetch. - Manifest: Update codeowners, docs, and issue tracker links. - HACS: Update name to IDFM Custom. - Translations: Add error messages.
Fixes a crash in the configuration flow where an invalid API response (causing a JSONDecodeError) during the direction selection step would result in a traceback. Now, the user is presented with an error message and can retry the stop selection.
PR created automatically by Jules for task 5278288494775205294 started by @azman0101