const axios = require('axios')
// NOTE: VALID way to create resolved promise
const p = axios.get('https://api.github.com/users/wolven531/repos')
console.log('promise created')
p.then(({ data, status, statusText }) => {
if (status !== 200) {
throw new Error(statusText)
}
console.log('inside then... resolution.data=', data)
})
.catch(err => {
console.log(err)
})
.finally(() => {
console.log('executing the finally...')
})