parameters: (update: AdvancedSettingRequest)
return_statement: return _create_settings_response()
docstring: Update advanced setting (feature flag)
docstring_summary: Update advanced setting (feature flag)
docstring_tokens: Update advanced setting ( feature flag )
function: async def post_settings(update: AdvancedSettingRequest) -> AdvancedSettingsResponse:
      """Update advanced setting (feature flag)"""
      try:
          await advanced_settings.set_adv_setting(update.id, update.value)
      except ValueError as e:
          raise LegacyErrorResponse(message=str(e)).as_error(status.HTTP_400_BAD_REQUEST)
      except advanced_settings.SettingException as e:
          # Severe internal error
          raise LegacyErrorResponse(message=str(e)).as_error(
              status.HTTP_500_INTERNAL_SERVER_ERROR
          )
      return _create_settings_response()
function_tokens: async def post_settings ( update : AdvancedSettingRequest ) -> AdvancedSettingsResponse : try : await advanced_settings . set_adv_setting ( update . id , update . value ) except ValueError as e : raise LegacyErrorResponse ( message = str ( e ) ) . as_error ( status . HTTP_400_BAD_REQUEST ) except advanced_settings . SettingException as e : # Severe internal error raise LegacyErrorResponse ( message = str ( e ) ) . as_error ( status . HTTP_500_INTERNAL_SERVER_ERROR ) return _create_settings_response ( )