why do i get a 400 bad request error code example
Example: 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=>{
});