Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slack hands out bad json: "user error (when expecting a Int, encountered String instead)" #6

Open
angerman opened this issue Feb 5, 2015 · 2 comments

Comments

@angerman
Copy link
Contributor

angerman commented Feb 5, 2015

I tried to track down a strange issue when starting a bot, and found that the team prefs look like the following:

{
  "default_channels": [
    "..."
  ],
  "disable_builtin_loading": true,
  "emoji_only_admins": true,
  "loading_only_admins": true,
  "retention_type": "1",
  "retention_duration": 0,
  "group_retention_type": "1",
  "group_retention_duration": 0,
  "dm_retention_type": "1",
  "dm_retention_duration": 0,
  "msg_edit_window_mins": -1,
  "allow_message_deletion": true,
  "hide_referers": true,
  "display_real_names": false,
  "who_can_at_everyone": "regular",
  "who_can_at_channel": "ra",
  "warn_before_at_channel": "always",
  "who_can_create_channels": "regular",
  "who_can_archive_channels": "regular",
  "who_can_create_groups": "ra",
  "who_can_post_general": "ra",
  "who_can_kick_channels": "admin",
  "who_can_kick_groups": "regular",
  "require_at_for_mention": 0,
  "compliance_export_start": 0
}

See the "1" fields. Which obviously clash with the Int :(

@mpickering
Copy link
Collaborator

Thanks a lot for this report. When group_retention_type is not set then I get sent down a 0 as an integer. I will forward your tweet onto the API team at Slack.

@tonyd256
Copy link
Contributor

@angerman I realize this is really old but I had the same issue and the fix was to toggle that setting in the admin setting for Slack. It should then start returning as the expected Int type. I went through Slack help and that's the resolution they gave me. They said they would investigate why it was a String in the first place but until that's fixed, this workaround was enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants