meteor / meteor/validation-error

Cannot add more fields to the ValidatedError

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12
Forks
4
PR merge metrics
No merged PRs in 30d

Description

When I try this:

``` javascript
throw new ValidationError([{
name: 'projectId',
type: 'project-not-found',
value: projectId
}]);
```

It's complaining with this error:

```
{error: "validation-error", reason: "errors.0.value is not allowed by the schema", details: Array[1], message: "errors.0.value is not allowed by the schema [validation-error]", errorType: "Meteor.Error"…}
```

I'm using version `0.2.0` because it doesn't let me upgrade it because of `aldeed:simple-schema`

```
error: Conflict: Constraint mdg:validation-error@0.5.1 is not satisfied by mdg:validation-error 0.2.0.
Constraints on package "mdg:validation-error":
* mdg:validation-error@0.5.1 <- ppp:ppp-projects-validators 0.0.1 <- ppp:ppp-launch 0.0.1 <- ppp:ppp-app-editor 0.0.1
* mdg:validation-error@0.2.0 <- aldeed:simple-schema 1.5.3 <- mdg:validation-error 0.2.0 <- ppp:ppp-projects-validators 0.0.1 <-ppp:ppp-launch 0.0.1 <- ppp:ppp-app-editor 0.0.1
* mdg:validation-error@0.2.0 <- aldeed:simple-schema 1.5.3 <- ppp:ppp-launch 0.0.1 <- ppp:ppp-app-editor 0.0.1
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the ValidationError example with version 0.2.0 and inspect the validation schema that rejects errors.0.value. Check the aldeed:simple-schema dependency constraints shown in the issue. Done means the additional field is accepted without leaving the package version conflict unresolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.