Request failed with status code 400 400 Bad Request 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=>{
});