I just tested this and it works as expected. Here is my code:
import axios from 'axios';
export async function test() {
try {
const response = await axios.get('https://www.google.com/');
console.log(response);
} catch (error) {
console.error(error);
}
}