meteor / meteor/validation-error

Silently swallowed when used within publish function

Open
#15 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
12
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Given a publish function:

``` js
Meteor.publish('hello', function(name) {
new SimpleSchema({name: {type: String, min: 5}}).validate({name})
return Names.find({name});
});
```

Subscribing with:

``` js
Meteor.subscribe('hello', 'x');
```

I would expect to see an error on the server console just like I do with `check` but I see nothing. The function simply does not publish anything and that's it, making it hard to debug publications.

_PS: I am going to cross-post this on the simple schema tracker because I honestly don't know where this belongs._

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Meteor.publish example with SimpleSchema validation and an invalid subscription argument. Trace how validation failures are handled during publication, using the server console output and publication behavior as the acceptance check. The issue names no repository files or tests, so locating the relevant entry point is part of the investigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.