Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8163977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:11:53+00:00 2026-06-06T19:11:53+00:00

Backbone.js has a neat feature where you are able to sync changes back to

  • 0

Backbone.js has a neat feature where you are able to sync changes back to your sever using standard HTTP verbs.

For example you may have a model object and some code which executes a get:

var coolModel = Backbone.Model.extend({url:'mysite/mymodel'});
var myCoolModel = new coolModel();
myCoolModel.fetch({error:processError});

Under the case where the server returns a 4XX or 5XX the error function ‘processError’ is run, which is great, you are able to process the error in which ever way suits.

As backbone.js uses jQuery to perform the GET, Jquery reports the error, which it is. The 4XX is a valid error which should be recovered from, my client side app is not broken, it just needs to behave slightly differently.

My question is – is it considered bad practice to have this error raised from jQuery displayed in the browsers console window or status bar? Should I be suppressing this error somehow so that users in production don’t see an error reported by the browser when the error is recoverable? Or is it correct in the land of HTTP to leave it as is?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:11:55+00:00Added an answer on June 6, 2026 at 7:11 pm

    Handling errors in Backbone is a really interesting topic and one I hope to write about at some point. It’s very nice to visually indicate errors to your users in a non-obtrusive manner. Some things to consider are:

    • Your users are not looking at the status bar or developer tools
    • Your users are expecting specific behavior from your application
    • When your application does not behave correctly visual problem indicators are important

    I’d recommend considering how the failure impacts the user’s intention. For instance if they are fetching data for the first page and that data is not returned correctly, you will need to handle the error by displaying a failure of data retrieved (or even better fall back on previously loaded data from a cache… it it exists). If the intention is to save an item and the error code returned is 400 that is definitely not a success and should be indicated that the user should retry saving again, (or perhaps attempt a re-save on an interval).

    You can silently ignore errors and not indicate them, but your users will get confused and it will lead to unexpected problems. I can’t preach to use perfect error handling, because I’m still getting better at it myself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do you replace Backbone.sync to do nothing? My app has a Submit button
I am working on a single-page app using Backbone.js. An issue that has occurred
My current backbone application has a url: localhost/#users Is there a way to access
I have a Backbone View that has a Collection as its Model. If the
Assume that I have a backbone model that has a bunch of boolean attributes:
A Backbone app which I'm developing has a collection and a model, and associated
I just started with backbone.js and is currently making a page which has a
What advantages does forge.ajax has over plain old jQuery.ajax or backbone.save() calls? I understand
We are using Backbone.js to build client-side UI that manipulates models shared by multiple
xml has been the backbone of the service oriented application(SOA) and it will be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.