Skip to content
This repository was archived by the owner on Dec 7, 2020. It is now read-only.
This repository was archived by the owner on Dec 7, 2020. It is now read-only.

Sending support messages throws error as bot if user is not set #124

Description

@kailan

https://sentry.io/syosset/syossethscom/issues/471090253/

Mongoid::Errors::InvalidFind: 
message:
  Calling Document.find with nil is invalid.
summary:
  Document.find expects the parameters to be 1 or more ids, and will return a single document if 1 id is provided, otherwise an array of documents if multiple ids are provided.
resolution:
  Most likely this is caused by passing parameters directly through to the find, and the parameter either is not present or the key from which it is accessed is incorrect.
  app/controllers/message_threads_controller.rb:22:in `send_message'
    user = User.find(params[:user_id])
...
(66 additional frame(s) were not displayed)

Mongoid::Errors::InvalidFind: 
message:
  Calling Document.find with nil is invalid.
summary:
  Document.find expects the parameters to be 1 or more ids, and will return a single document if 1 id is provided, otherwise an array of documents if multiple ids are provided.
resolution:
  Most likely this is caused by passing parameters directly through to the find, and the parameter either is not present or the key from which it is accessed is incorrect.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions