question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error message does not give indication to problem

See original GitHub issue

I’m getting errors on saving one of my models. This is likely from importing a bunch of data I exported from a Postgres database, but everything is displaying, and I can access the relations attached to the models.

I’m getting:

Error: Some errors were encountered while saving mystics@model:interpretation: 26

and the line the error message comes from is:

if (rejected.length !== 0) {
            var error = new Error(fmt('Some errors were encountered while saving %@ %@', [type, record.id]));
                error.errors = rejected.mapBy('reason');
            reject(error);
          } else {...

Not sure how to debug this, as it doesn’t give me too much information on where to begin looking.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
tstirratcommented, Jun 16, 2015

you’ll need to look into error.errors which should contain an array of strings (or Error objects)

record.save()
  .then(...)
  .catch(e => {
    console.log(e.errors);
  });
1reaction
bj-mcduckcommented, Jun 16, 2015

Cool. I was able to guesstimate what my problem was in this case, lucky! I had a field that was an array, in my model I was doing:

tags: DS.attr(),
...

Which Firebase barfed at. So my personal issue is fixed.

That is great information, @tstirrat. Thanks. I’ll make sure to do that in future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Messages: Examples, Best Practices & Common Mistakes
Useful error messages can keep users on your site and increase conversions. See examples and learn the best practices.
Read more >
How to Write Good Error Messages - UX Planet
1. Be Clear And Not Ambiguous ... Write error message in clear and simple language. User should be able to understand the problem...
Read more >
Error Message Guidelines - Nielsen Norman Group
Explicit indication that something has gone wrong. The very worst error messages are those that don't exist. When users make mistakes and get...
Read more >
Error occurs when you send or receive an email message in ...
This article lists common methods to help you troubleshoot problems that you may experience when you receive or send an email message in...
Read more >
Understanding Success Criterion 3.3.1: Error Identification | WAI
The error message should be as specific as possible. In the case of an unsuccessful form submission, re-displaying the form and indicating the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found