Hello! So, every day for the past few days, the developers at Vital have added a few more resources to the ClientFacingResource enum.
The Python SDK imposes pretty strict validation on this data type, and the effect of this is that our app, which depends on the "get all providers" endpoint, gets this wall of errors. This has taken down our app twice on consecutive days:
pydantic_core._pydantic_core.ValidationError: 9 validation errors for list[ClientFacingProviderDetailed]
1.supported_resources.6
Input should be 'profile', 'activity', 'sleep', 'body', 'workouts', 'workout_stream', 'connection', 'order', 'result', 'appointment', 'glucose', 'heartrate', 'hrv', 'ige', 'igg', 'blood_oxygen', 'blood_pressure', 'cholesterol', 'device', 'weight', 'fat', 'body_temperature', 'body_temperature_delta', 'meal', 'water', 'caffeine', 'mindfulness_minutes', 'steps', 'calories_active', 'distance', 'floors_climbed', 'respiratory_rate', 'vo2_max', 'calories_basal', 'stress_level', 'menstrual_cycle', 'sleep_cycle', 'electrocardiogram', 'electrocardiogram_voltage', 'afib_burden', 'heart_rate_alert', 'stand_hour', 'stand_duration', 'sleep_apnea_alert', 'sleep_breathing_disturbance', 'wheelchair_push', 'forced_expiratory_volume_1', 'forced_vital_capacity', 'peak_expiratory_flow_rate', 'inhaler_usage', 'fall', 'uv_exposure', 'daylight_exposure', 'handwashing', 'basal_body_temperature', 'workout_duration', 'insulin_injection', 'carbohydrates', 'note', 'sleep_stream' or 'hypnogram' [type=enum, input_value='body_mass_index', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/enum
1.supported_resources.28
Input should be 'profile', 'activity', 'sleep', 'body', 'workouts', 'workout_stream', 'connection', 'order', 'result', 'appointment', 'glucose', 'heartrate', 'hrv', 'ige', 'igg', 'blood_oxygen', 'blood_pressure', 'cholesterol', 'device', 'weight', 'fat', 'body_temperature', 'body_temperature_delta', 'meal', 'water', 'caffeine', 'mindfulness_minutes', 'steps', 'calories_active', 'distance', 'floors_climbed', 'respiratory_rate', 'vo2_max', 'calories_basal', 'stress_level', 'menstrual_cycle', 'sleep_cycle', 'electrocardiogram', 'electrocardiogram_voltage', 'afib_burden', 'heart_rate_alert', 'stand_hour', 'stand_duration', 'sleep_apnea_alert', 'sleep_breathing_disturbance', 'wheelchair_push', 'forced_expiratory_volume_1', 'forced_vital_capacity', 'peak_expiratory_flow_rate', 'inhaler_usage', 'fall', 'uv_exposure', 'daylight_exposure', 'handwashing', 'basal_body_temperature', 'workout_duration', 'insulin_injection', 'carbohydrates', 'note', 'sleep_stream' or 'hypnogram' [type=enum, input_value='lean_body_mass', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/enum
1.supported_resources.45
Input should be 'profile', 'activity', 'sleep', 'body', 'workouts', 'workout_stream', 'connection', 'order', 'result', 'appointment', 'glucose', 'heartrate', 'hrv', 'ige', 'igg', 'blood_oxygen', 'blood_pressure', 'cholesterol', 'device', 'weight', 'fat', 'body_temperature', 'body_temperature_delta', 'meal', 'water', 'caffeine', 'mindfulness_minutes', 'steps', 'calories_active', 'distance', 'floors_climbed', 'respiratory_rate', 'vo2_max', 'calories_basal', 'stress_level', 'menstrual_cycle', 'sleep_cycle', 'electrocardiogram', 'electrocardiogram_voltage', 'afib_burden', 'heart_rate_alert', 'stand_hour', 'stand_duration', 'sleep_apnea_alert', 'sleep_breathing_disturbance', 'wheelchair_push', 'forced_expiratory_volume_1', 'forced_vital_capacity', 'peak_expiratory_flow_rate', 'inhaler_usage', 'fall', 'uv_exposure', 'daylight_exposure', 'handwashing', 'basal_body_temperature', 'workout_duration', 'insulin_injection', 'carbohydrates', 'note', 'sleep_stream' or 'hypnogram' [type=enum, input_value='waist_circumference', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/enum
33.supported_resources.4
Input should be 'profile', 'activity', 'sleep', 'body', 'workouts', 'workout_stream', 'connection', 'order', 'result', 'appointment', 'glucose', 'heartrate', 'hrv', 'ige', 'igg', 'blood_oxygen', 'blood_pressure', 'cholesterol', 'device', 'weight', 'fat', 'body_temperature', 'body_temperature_delta', 'meal', 'water', 'caffeine', 'mindfulness_minutes', 'steps', 'calories_active', 'distance', 'floors_climbed', 'respiratory_rate', 'vo2_max', 'calories_basal', 'stress_level', 'menstrual_cycle', 'sleep_cycle', 'electrocardiogram', 'electrocardiogram_voltage', 'afib_burden', 'heart_rate_alert', 'stand_hour', 'stand_duration', 'sleep_apnea_alert', 'sleep_breathing_disturbance', 'wheelchair_push', 'forced_expiratory_volume_1', 'forced_vital_capacity', 'peak_expiratory_flow_rate', 'inhaler_usage', 'fall', 'uv_exposure', 'daylight_exposure', 'handwashing', 'basal_body_temperature', 'workout_duration', 'insulin_injection', 'carbohydrates', 'note', 'sleep_stream' or 'hypnogram' [type=enum, input_value='body_mass_index', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/enum
33.supported_resources.16
Input should be 'profile', 'activity', 'sleep', 'body', 'workouts', 'workout_stream', 'connection', 'order', 'result', 'appointment', 'glucose', 'heartrate', 'hrv', 'ige', 'igg', 'blood_oxygen', 'blood_pressure', 'cholesterol', 'device', 'weight', 'fat', 'body_temperature', 'body_temperature_delta', 'meal', 'water', 'caffeine', 'mindfulness_minutes', 'steps', 'calories_active', 'distance', 'floors_climbed', 'respiratory_rate', 'vo2_max', 'calories_basal', 'stress_level', 'menstrual_cycle', 'sleep_cycle', 'electrocardiogram', 'electrocardiogram_voltage', 'afib_burden', 'heart_rate_alert', 'stand_hour', 'stand_duration', 'sleep_apnea_alert', 'sleep_breathing_disturbance', 'wheelchair_push', 'forced_expiratory_volume_1', 'forced_vital_capacity', 'peak_expiratory_flow_rate', 'inhaler_usage', 'fall', 'uv_exposure', 'daylight_exposure', 'handwashing', 'basal_body_temperature', 'workout_duration', 'insulin_injection', 'carbohydrates', 'note', 'sleep_stream' or 'hypnogram' [type=enum, input_value='lean_body_mass', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/enum
33.supported_resources.26
Input should be 'profile', 'activity', 'sleep', 'body', 'workouts', 'workout_stream', 'connection', 'order', 'result', 'appointment', 'glucose', 'heartrate', 'hrv', 'ige', 'igg', 'blood_oxygen', 'blood_pressure', 'cholesterol', 'device', 'weight', 'fat', 'body_temperature', 'body_temperature_delta', 'meal', 'water', 'caffeine', 'mindfulness_minutes', 'steps', 'calories_active', 'distance', 'floors_climbed', 'respiratory_rate', 'vo2_max', 'calories_basal', 'stress_level', 'menstrual_cycle', 'sleep_cycle', 'electrocardiogram', 'electrocardiogram_voltage', 'afib_burden', 'heart_rate_alert', 'stand_hour', 'stand_duration', 'sleep_apnea_alert', 'sleep_breathing_disturbance', 'wheelchair_push', 'forced_expiratory_volume_1', 'forced_vital_capacity', 'peak_expiratory_flow_rate', 'inhaler_usage', 'fall', 'uv_exposure', 'daylight_exposure', 'handwashing', 'basal_body_temperature', 'workout_duration', 'insulin_injection', 'carbohydrates', 'note', 'sleep_stream' or 'hypnogram' [type=enum, input_value='waist_circumference', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/enum
35.supported_resources.4
Input should be 'profile', 'activity', 'sleep', 'body', 'workouts', 'workout_stream', 'connection', 'order', 'result', 'appointment', 'glucose', 'heartrate', 'hrv', 'ige', 'igg', 'blood_oxygen', 'blood_pressure', 'cholesterol', 'device', 'weight', 'fat', 'body_temperature', 'body_temperature_delta', 'meal', 'water', 'caffeine', 'mindfulness_minutes', 'steps', 'calories_active', 'distance', 'floors_climbed', 'respiratory_rate', 'vo2_max', 'calories_basal', 'stress_level', 'menstrual_cycle', 'sleep_cycle', 'electrocardiogram', 'electrocardiogram_voltage', 'afib_burden', 'heart_rate_alert', 'stand_hour', 'stand_duration', 'sleep_apnea_alert', 'sleep_breathing_disturbance', 'wheelchair_push', 'forced_expiratory_volume_1', 'forced_vital_capacity', 'peak_expiratory_flow_rate', 'inhaler_usage', 'fall', 'uv_exposure', 'daylight_exposure', 'handwashing', 'basal_body_temperature', 'workout_duration', 'insulin_injection', 'carbohydrates', 'note', 'sleep_stream' or 'hypnogram' [type=enum, input_value='body_mass_index', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/enum
35.supported_resources.15
Input should be 'profile', 'activity', 'sleep', 'body', 'workouts', 'workout_stream', 'connection', 'order', 'result', 'appointment', 'glucose', 'heartrate', 'hrv', 'ige', 'igg', 'blood_oxygen', 'blood_pressure', 'cholesterol', 'device', 'weight', 'fat', 'body_temperature', 'body_temperature_delta', 'meal', 'water', 'caffeine', 'mindfulness_minutes', 'steps', 'calories_active', 'distance', 'floors_climbed', 'respiratory_rate', 'vo2_max', 'calories_basal', 'stress_level', 'menstrual_cycle', 'sleep_cycle', 'electrocardiogram', 'electrocardiogram_voltage', 'afib_burden', 'heart_rate_alert', 'stand_hour', 'stand_duration', 'sleep_apnea_alert', 'sleep_breathing_disturbance', 'wheelchair_push', 'forced_expiratory_volume_1', 'forced_vital_capacity', 'peak_expiratory_flow_rate', 'inhaler_usage', 'fall', 'uv_exposure', 'daylight_exposure', 'handwashing', 'basal_body_temperature', 'workout_duration', 'insulin_injection', 'carbohydrates', 'note', 'sleep_stream' or 'hypnogram' [type=enum, input_value='lean_body_mass', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/enum
35.supported_resources.22
Input should be 'profile', 'activity', 'sleep', 'body', 'workouts', 'workout_stream', 'connection', 'order', 'result', 'appointment', 'glucose', 'heartrate', 'hrv', 'ige', 'igg', 'blood_oxygen', 'blood_pressure', 'cholesterol', 'device', 'weight', 'fat', 'body_temperature', 'body_temperature_delta', 'meal', 'water', 'caffeine', 'mindfulness_minutes', 'steps', 'calories_active', 'distance', 'floors_climbed', 'respiratory_rate', 'vo2_max', 'calories_basal', 'stress_level', 'menstrual_cycle', 'sleep_cycle', 'electrocardiogram', 'electrocardiogram_voltage', 'afib_burden', 'heart_rate_alert', 'stand_hour', 'stand_duration', 'sleep_apnea_alert', 'sleep_breathing_disturbance', 'wheelchair_push', 'forced_expiratory_volume_1', 'forced_vital_capacity', 'peak_expiratory_flow_rate', 'inhaler_usage', 'fall', 'uv_exposure', 'daylight_exposure', 'handwashing', 'basal_body_temperature', 'workout_duration', 'insulin_injection', 'carbohydrates', 'note', 'sleep_stream' or 'hypnogram' [type=enum, input_value='waist_circumference', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/enum
I know this is a "move fast and break things" situation and that the SDK is allowed to break between minor versions, but can I please request that you either signal how long this is going to continue or provide some kind of upgrade path? As it stands, this particular endpoint is completely unusable to us because we can't trust it not to crash with a Pydantic error instead of producing a result.
Some examples of things that would work in (what I estimate) is ascending order of labor required:
Hello! So, every day for the past few days, the developers at Vital have added a few more resources to the
ClientFacingResourceenum.The Python SDK imposes pretty strict validation on this data type, and the effect of this is that our app, which depends on the "get all providers" endpoint, gets this wall of errors. This has taken down our app twice on consecutive days:
I know this is a "move fast and break things" situation and that the SDK is allowed to break between minor versions, but can I please request that you either signal how long this is going to continue or provide some kind of upgrade path? As it stands, this particular endpoint is completely unusable to us because we can't trust it not to crash with a Pydantic error instead of producing a result.
Some examples of things that would work in (what I estimate) is ascending order of labor required:
strClientFacingResource | Unrecognized(where Unrecognized is some kind of alias for str)Note: there are potentially similar problems for the
ProvidersandDemoProvidersenums, which also seem extremely coupled to "what the response happens to be right now."