Skip to content

fix: omit subseconds from redelivery dates - #1068

Closed
Dodothereal wants to merge 1 commit into
auth0:masterfrom
Dodothereal:fix/1067-redeliveries-createasync-sends-date-from
Closed

fix: omit subseconds from redelivery dates#1068
Dodothereal wants to merge 1 commit into
auth0:masterfrom
Dodothereal:fix/1067-redeliveries-createasync-sends-date-from

Conversation

@Dodothereal

Copy link
Copy Markdown

fix: omit subseconds from redelivery dates

Summary

Redeliveries.CreateAsync serialized date_from and date_to with milliseconds, although the endpoint accepts RFC 3339 values only to whole-second precision. This change applies a request-specific serializer that omits fractional seconds while preserving the DateTime offset/kind. The behavior is covered through the redelivery mock-server request assertion.

Fixes #1067

Changes

  • Serialize CreateEventStreamRedeliveryRequestContent.DateFrom and DateTo without sub-second precision.
  • Extend the redelivery creation test with millisecond-bearing inputs and the expected whole-second JSON payload.

Testing

  • git diff --check completed successfully.
  • sandbox-run "dotnet test tests/Auth0.ManagementApi.Test/Auth0.ManagementApi.Test.csproj --no-restore" could not run because the sandbox image does not include dotnet (dotnet: command not found).
  • sandbox-run "dotnet test tests/Auth0.ManagementApi.Test/Auth0.ManagementApi.Test.csproj" also could not run for the same reason.

AI assistance disclosure

This contribution was produced by an autonomous AI coding agent (Claude Code) that @Dodothereal operates and monitors. @Dodothereal is accountable for it, will address review feedback promptly, and will close this PR immediately if this kind of contribution is unwelcome in this project. Commits carry an Assisted-by: Claude Code trailer.

@Dodothereal
Dodothereal requested a review from a team as a code owner July 17, 2026 12:27
@kailash-b kailash-b added the api Related to the public API surface. label Jul 24, 2026
@kailash-b

Copy link
Copy Markdown
Contributor

Hi @Dodothereal 👋

Thank you for taking the time to dig into this. We appreciate your effort to raise this PR, however, we're going to go forward with #1087, which has a very similar approach.
Below are the two reasons we chose #1087 over this.

  1. The converter in this PR formats with "yyyy'-'MM'-'dd'T'HH':'mm':'ssK". K renders differently depending on DateTime.Kind, so running it through the serializer can give different outputs depending on the DateTimeKind.
  2. Since Auth0.ManagementApi is generated by Fern, and CreateEventStreamRedeliveryRequestContent.cs and the mock-server CreateTest.cs aren't listed in .fernignore, both edits would be overwritten on our next regeneration and the bug would silently come back.

Just to be clear, none of this is a knock on the contribution, the diagnosis was correct and the fix shape was right. It came down to the timezone edge cases and how we manage custom-code alongside fern-generated code.

If you are up for contributing again, we genuinely welcome it. Just a heads-up, according to our contribution guidelines you will need to have your commits verified.

Thanks again for helping make the SDK better 🤝
Closing this PR.

@kailash-b kailash-b closed this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Related to the public API surface.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redeliveries.CreateAsync sends date_from with sub-second precision, causing 400 Bad Request

2 participants