This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Jon Madison
Posted Sep 19 - Read on Facebook

What is the best way to suppress/eat Framer error messages? I've handled an error in the UI, but for whatever reason (i'm working on tracking that down) it still results in a console error, that gets ultimately displayed on the prototype on the device. Its not fatal and I don't care to show this error to the user. Is there a way to suppress these errors from showing up in the UI?

2 Comments

George Kedenburg III

whats the error?

Jon Madison

i've prevented the error from happening, but can't for the life of me figure out why something so basic doesn't seem to be working, i must be missing something simple.

it's basically something like this:

if event.error
showError("No results found for \"#{event.keyword}\". Try your search again?")
console.log(event.error)
else
hydrateListView(event.json, app.searchResults)

hydrateListView is still throwing an error from being called (error, therefor event.json is null). so i fixed hydrateListView to return if json is null, which I should be doing anyway. I am naive enough to think that hydrateListView wouldn't even execute in the "else" clause, but it apparently still gets evaluated. i'm apparently having a brain fart this morning, thinking that the else clause would never even be evaluated (maybe it's a coffescript thing). I changed it to an if/else after i noticed that hydrateListView is still being called/evaluated after an early return.

Read the entire post on Facebook