Title: HttpRetryOptions.from_json raises KeyError on wire payloads missing optional retry fields or using snake_case keys · Issue #351 · microsoft/durabletask-python · GitHub
Open Graph Title: HttpRetryOptions.from_json raises KeyError on wire payloads missing optional retry fields or using snake_case keys · Issue #351 · microsoft/durabletask-python
X Title: HttpRetryOptions.from_json raises KeyError on wire payloads missing optional retry fields or using snake_case keys · Issue #351 · microsoft/durabletask-python
Description: Bug Description In azure.durable_functions.http.models.HttpRetryOptions.from_json(), the deserializer assumes all optional fields are present as exact camelCase keys in the dictionary payload: @classmethod def from_json(cls, value: dict[...
Open Graph Description: Bug Description In azure.durable_functions.http.models.HttpRetryOptions.from_json(), the deserializer assumes all optional fields are present as exact camelCase keys in the dictionary payload: @cla...
X Description: Bug Description In azure.durable_functions.http.models.HttpRetryOptions.from_json(), the deserializer assumes all optional fields are present as exact camelCase keys in the dictionary payload: @cla...
Opengraph URL: https://github.com/microsoft/durabletask-python/issues/351
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"HttpRetryOptions.from_json raises KeyError on wire payloads missing optional retry fields or using snake_case keys","articleBody":"## Bug Description\n\nIn `azure.durable_functions.http.models.HttpRetryOptions.from_json()`, the deserializer assumes all optional fields are present as exact camelCase keys in the dictionary payload:\n\n```python\n@classmethod\ndef from_json(cls, value: dict[str, Any]) -> \"HttpRetryOptions\":\n max_interval = value[\"maxRetryIntervalInMilliseconds\"]\n timeout = value[\"retryTimeoutInMilliseconds\"]\n return cls(\n first_retry_interval=timedelta(milliseconds=value[\"firstRetryIntervalInMilliseconds\"]),\n max_number_of_attempts=value[\"maxNumberOfAttempts\"],\n backoff_coefficient=value[\"backoffCoefficient\"],\n max_retry_interval=timedelta(milliseconds=max_interval) if max_interval is not None else None,\n retry_timeout=timedelta(milliseconds=timeout) if timeout is not None else None,\n status_codes_to_retry=value.get(\"statusCodesToRetry\"))\n```\n\nWhen a payload omits optional fields (such as `maxRetryIntervalInMilliseconds`, `retryTimeoutInMilliseconds`, or `backoffCoefficient` when default values were used, or when serialized across language boundaries), `from_json()` raises `KeyError`:\n\n```python\nKeyError: 'maxRetryIntervalInMilliseconds'\n```\n\nAdditionally, unlike `DurableHttpResponse.from_json()`, which defensively accepts both `status_code` and `statusCode`, `HttpRetryOptions.from_json()` does not support `snake_case` key naming (`first_retry_interval_in_milliseconds`, `max_number_of_attempts`, `backoff_coefficient`, etc.), failing with `KeyError` if snake_case dictionaries are supplied.\n\n## Expected Behavior\n\n`HttpRetryOptions.from_json()` should safely parse dictionary payloads with missing optional fields, falling back to the class constructor's documented defaults (`backoff_coefficient=1.0`, `max_retry_interval=timedelta(days=6)`, `retry_timeout=None`, `status_codes_to_retry=None`). It should also support both camelCase and snake_case key conventions defensively.\n","author":{"url":"https://github.com/hardikkaurani","@type":"Person","name":"hardikkaurani"},"datePublished":"2026-11-10T22:39:05Z","url":"https://github.com/microsoft/durabletask-python/issues/351"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:eae670a1-b819-da5e-e4e8-c6a4ac7f0836 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D44E:2DA781:BC03C4:108EB08:6AFE2CE3 |
| html-safe-nonce | 87f89c27d56af63b3cef7a05eb5a77c2523a36ed30ec687f2d4e7c1998103ed8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDRFOjJEQTc4MTpCQzAzQzQ6MTA4RUIwODo2QUZFMkNFMyIsInZpc2l0b3JfaWQiOiI3MTg5NDM1MDE2NTc5Nzg4MDAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d016546d5981a49cb9febdf35b206624854b0cf60773598ef022a57cd2b095c8 |
| hovercard-subject-tag | issue:6317346952 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/durabletask-python/351/issue_layout |
| twitter:image | https://opengraph.githubassets.com/910b33bb517712946975d3f7e04df5ebda0a6a9c9d76a458863144f037f1fab0/microsoft/durabletask-python/issues/351 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/910b33bb517712946975d3f7e04df5ebda0a6a9c9d76a458863144f037f1fab0/microsoft/durabletask-python/issues/351 |
| og:image:alt | Bug Description In azure.durable_functions.http.models.HttpRetryOptions.from_json(), the deserializer assumes all optional fields are present as exact camelCase keys in the dictionary payload: @cla... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hardikkaurani |
| hostname | github.com |
| expected-hostname | github.com |
| None | e973f9ec3625f3faad8cac5c2d11a214b7ffe45f3cc563b828459b290ecaeed3 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/durabletask-python git https://github.com/microsoft/durabletask-python.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 627664515 |
| octolytics-dimension-repository_nwo | microsoft/durabletask-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627664515 |
| octolytics-dimension-repository_network_root_nwo | microsoft/durabletask-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1f92c367595b9190e0be293896078033886b1913 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width