Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

78
Views
Api call using Ajax in javascript giving error

i am getting error on calling ajax request with a code 422(unprocessible entity) , i dont understand what is wrong with my code can someone help me to figure out the error

         $.ajax({
            url: "/api/v3/email_exists",
            method: 'POST',
            data: {
              email: email_entered
            },
            success: function (response, status) {
                if (response.sent) {
                    showFlashMessage('Email Sent');
                    alert(response);
                }
                else {
                    showFlashMessage('An error occured, please try again latervrfg.', 'error');
                }
            },
            error: function (response, status) {
                showFlashMessage('An error occured, please try again later.', 'error');
            }
        }); 

url is returning either true or false in case of false it is giving status 422

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try with a full URL e,g https://Path_to _the controller_method

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!