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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:26:11+00:00 2026-05-31T20:26:11+00:00

On the client, I am doing a standard ajax call to an MVC action.

  • 0

On the client, I am doing a standard ajax call to an MVC action.

$.ajax({
            type: "POST",
            url: '/FileUpload/CheckGuess/',
            dataType: "json",
            contentType: "application/json; charset=utf-8",
            data: jsonSerialized,
            success: function (result) {
                console.log(result);
                dfd.resolve();
            },
            error: function (error) {
                console.log(error);
                dfd.reject();
            }
        });

My CheckGuess action returns a JsonResult. I want to notify an ajax call that there was an error to invoke error: handler. How do I do it with HTTP response (I’ve read it’s better then sending obligatory json and parsing it in a success: handler.

  • 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-05-31T20:26:12+00:00Added an answer on May 31, 2026 at 8:26 pm

    you should return an error status code from the action.
    For example a status 500, means an internal error in the application. You could also use some of the 400 errors as well.
    The error callback should be called for any other status outside the 200 range.

    The status code in the application is set to the response object.

    Ref: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes

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

Sidebar

Related Questions

I am doing some client side validation in ASP.NET MVC and I found myself
I saw a client doing $bash -x command to see if the file is
I'm writing a custom TCP server and client and on doing a ton of
I'm doing some wsdl- and client-first development in C# with WCF (the wsdl and
I am doing an Online Quiz project in C#. The test client is a
I am coding a E-commerce website/admin interface for a client. They are doing some
In short, I'm doing 2-way SSL and the client certificate is used to identify
We're building a set of external web services to be consumed client-side (using jquery/AJAX)
I am making a simple FTP client in Java using standard Java sockets. I
i am doing small ftp client for recieving some big files from ftp. I

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.