Skip to content

Conversation

@WhitWaldo
Copy link
Contributor

@WhitWaldo WhitWaldo commented Feb 22, 2025

Description

Actor reminders should return null if they aren't registered and should return a ReminderInfo if they are registered. According to the API documentation, this is distinguished by the status code returned:

Status Code Action
200 Read the actor info from the response body
500 Not available

The original implementation of this never read the status code and instead started with a ReminderInfo populated with default values for each property and attempted to deserialize each property and update the value if available in the returned body. As a result, this means that the response would never be null and if not registered, the only way to determine this was to do a default check against each of the properties.

This PR changes this - if the status code is 500, this will return a null value. If the status code is 200, it will perform the ReminderInfo deserialization as it did before.

There were no unit tests validating this behavior, so I've also gone through and added several.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1466

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • [N/A] Extended the documentation

@WhitWaldo WhitWaldo requested review from a team as code owners February 22, 2025 01:31
@WhitWaldo WhitWaldo self-assigned this Feb 22, 2025
@WhitWaldo WhitWaldo added this to the v1.15 milestone Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GetActorReminder() not returning null when Reminder does not exist

1 participant