Unable to fetch the statuses for the userid, even though lookupProfile works correctly. It goes to the catch block. What is wrong with the code?
I am using url: http://localhost:3000/probinquery.id.blockstack
I am able to get the status after login
fetchData() {
const username = this.props.match.params.username
console.log(username);
lookupProfile(username)
.then((profile) => {
this.setState({
person: new Person(profile),
username: username
})
console.log(this.state)
})
.catch((error) => {
console.log('could not resolve profile')
})
const options = { username: username, decrypt: false}
console.log(options)
getFile('statuses.json', options)
.then((file) => {
var statuses = JSON.parse(file || '[]')
console.log(statuses)
this.setState({
statusIndex: statuses.length,
statuses: statuses
})
})
.catch((error) => {
console.log("could not fetch statuses")
})
.finally(() => {
this.setState({ isLoading: false })
})
}