@r/api-client
Version:
node and browser reddit api library
15 lines (10 loc) • 354 B
JavaScript
import FakeError from './FakeError';
export default class ValidationError extends FakeError {
constructor (name, model, errors) {
super(name);
this.name = 'NoModelError';
this.message = name + ' had errors in: ' + errors.join(',') +
' with properties ' + JSON.stringify(model.toJSON());
this.status = 422;
}
}