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

  • SEARCH
  • Home
  • 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 7967259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:38:54+00:00 2026-06-04T06:38:54+00:00

I get an error response from the .save() function. The server side php returns

  • 0

I get an error response from the .save() function. The server side php returns me a text and successfully saves the url into database. When I inspect the response I can see the text returned by PHP, however I do not understand why it turns in the error callback. What could be the reason?

urlToAdd.save({}, {
    success: function () {
        console.log("In here");
    },
    error: function (model, response) {
        console.log(model.toJSON());
        console.log(response);
        console.log("Not in here");
    }
});

The server responds with:

HTTP/1.1 200 OK
Date: Sat, 19 May 2012 21:31:27 GMT
Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
X-Powered-By: PHP/5.3.6
Content-Length: 96
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html
X-Pad: avoid browser bug
  • 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-04T06:38:56+00:00Added an answer on June 4, 2026 at 6:38 am

    Hmmm… Even though the response is valid, the content-type tells the whole story… The expected content-type should be application/json. If your response isn’t JSON, error will be invoked every time. If you have a way to encode your response as JSON, you should see the success invoked instead of the error.

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

Sidebar

Related Questions

$.get($(this).attr('rel'), function(response){}, 'script') .error(function(){ alert('this failed')}); I get. .error is not a method .
After I get response from httpwebrequest, I'd like the cookies obtained to save for
I am sending an error response to my jQuery. However, I can not get
When consuming a .NET WCF webservice I get the following response (error): Unsupported HTTP
What's the maximum length of an HTTP GET request? Is there a response error
I get this response: {success:true,errorCode:-1,error:} No HTML inside the JSON, but the js say
I get error: ORA-06575: Package or function GET_CONC_NAMES is in an invalid state When
Why I get error with this query on my live server but not on
What is the best way to get error messages from a WF4 workflow back
I use the following jquery statements but i get error in this function onGetDataSuccess(result)

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.