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 9214929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:05:02+00:00 2026-06-18T02:05:02+00:00

I am trying to get response message from jsonp error callback in angularjs, but

  • 0

I am trying to get response message from jsonp error callback in angularjs, but response data is undefined. I return the response with 409 http code. If to open jsonp url directly in browser it shows “angular.callbacks._0({“message”:”Reset link is incorrect”})”, but I can’t get this message in error callback. What am I doing wrong?

// Extend angular app for api requests
app.factory('User', function($http) {

    var User = function(data) {
        angular.extend(this, data);
    };

    // Send link for password reset to entered email
    User.reset_password = function() {
        return $http.jsonp(jsonp_url + 'user/reset_pass?_method=post&user_key=' + user_key + '&callback=JSON_CALLBACK');
    };

    return User;
});


app.controller('ResetPasswordController', function ResetPasswordController($scope, User){

    $scope.submit = function() {

        var response = User.reset_password();

        response.then(function(data){
            //Success callback
        }, function(data){
            // Error callback
            console.log(data) // Output: {config : {...}, data: undefined}
        });
    }

});
  • 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-18T02:05:05+00:00Added an answer on June 18, 2026 at 2:05 am

    As said Brandon Tilley it is not possible to get data from jsonp response with http error code. If you want anyways to get error message you need to send something like this {result: false, msg: ‘Error occured…’} with “good” http code, for example 200.

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

Sidebar

Related Questions

Possible Duplicate: Uploadify: show error message from HTTP response I am trying to get
I'm trying to get error messages from Zend_Form and response as json. What is
I am trying to get data from a webserver and display a message saying
I'm trying to get a JSON response and iterate through the data. Here is
I am trying following, 1. Get response using Ajax from the users selection which
I'm trying to get a jsonp callback working using jquery within a greasemonkey script.
I'm trying to get data from Geobytes. One of the templates returns JSON and
I am trying to parse the JSON response get from the server and I
I'm trying to make an ajax-request to vimeo to get data from an vimeo
hi I am trying to fetch data from link as given below http://abovestress.com/app_stress/fetch_all_detail.php?task=fetchtimefromdateanduserid&track_date=2011-08-09&tracker_user_id=374 but

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.