Skip to content

Fix: possible errors on rocket.chat side of the apps#10252

Merged
rodrigok merged 3 commits intodevelopfrom
prevent-errors-on-rocketchat-side-to-apps
Mar 28, 2018
Merged

Fix: possible errors on rocket.chat side of the apps#10252
rodrigok merged 3 commits intodevelopfrom
prevent-errors-on-rocketchat-side-to-apps

Conversation

@graywolf336
Copy link
Copy Markdown
Contributor

These errors were added to ensure the data to the Rocket.Chat Apps system could be guaranteed, however this sadly can not be the case as Rocket.Chat doesn't have internal data verification and ensurations.

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10252 March 28, 2018 15:45 Inactive
return UserType.BOT;
default:
throw new Error('Unknown user type of:', type);
return type.toUpperCase();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep spitting out at least a warning?

To at least make sure we are always aware that we have types that aren't valid?

We should be striving for default to never be hit. If we have to do so by being annoying to our self maybe not such a bad thing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some warning logs now. 👍

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10252 March 28, 2018 17:14 Inactive
@rodrigok rodrigok changed the title [OTHER] Fix possible errors on rocket.chat side of the apps Fix: possible errors on rocket.chat side of the apps Mar 28, 2018
@rodrigok rodrigok added this to the 0.63.0 milestone Mar 28, 2018
@rodrigok rodrigok merged commit 761d84e into develop Mar 28, 2018
@rodrigok rodrigok deleted the prevent-errors-on-rocketchat-side-to-apps branch March 28, 2018 18:45
@rodrigok rodrigok mentioned this pull request Apr 4, 2018
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

Successfully merging this pull request may close these issues.

4 participants