error status 400 bad request code example
Example 1: error: request failed with status code 400
You should add a catch to the get call:
import axios from 'axios';
import config from './config';
axios.get('${config.serverUrl/api/contests')
.then(resp=>{
console.log(resp.data);
})
.catch(error=>{
});
Example 2: html error 400
<hlml> </html>