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

129
Views
Error: la solicitud falló con el código de estado 422

Recibo este error en mi código. Estoy haciendo una solicitud de publicación pasando un valor (número). Y al hacerlo, obtengo este código de error 422 (Entidad no procesable). Aquí hay un fragmento de mi código:

 import React, { Component } from 'react'

importar axios desde 'axios'

clase de exportación PostForm extiende Componente { constructor (accesorios) { super (accesorios)

 this.state = { Amount:[], } } changeHandler = (e) => { this.setState({[e.target.name]: e.target.value}) } submitHandler = e => { e.preventDefault() console.log(this.state) axios.post('http://[::1]:3000/amounts', this.state) .then(response => { console.log(response) }) .catch(error => { console.log(error) }) } render() { const {Amount} = this.state return ( <div> <form onSubmit={this.submitHandler}> <div> <div> <h1>Input Amount</h1> </div> <input type="string" name="Amount" value={Amount} onChange={this.changeHandler} /> </div> <button onClick>SubmitPost</button> </form> </div> ) }

}

exportar PostForm predeterminado

about 4 years ago · Juan Pablo Isaza
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!