message: return a blank profile if profile fetch fails
diff: @@ -13,6 +13,11 @@ import { BLOCKSTACK_APP_PRIVATE_KEY_LABEL,
  import { extractProfile } from '../profiles'
  +const DEFAULT_PROFILE = {
  + '@type': 'Person',
  + '@context': 'http://schema.org'
  +}
  +
  /**
  * Generates a ECDSA keypair and stores the hex value of the private key in
  * local storage.
  @@ -170,8 +175,15 @@ export function handlePendingSignIn(nameLookupURL: string = 'https://core.blocks
  userData.profile === undefined) &&
  profileURL !== undefined && profileURL !== null) {
  fetch(profileURL)
  - .then(response => response.text())
  - .then(response => JSON.parse(response))
  + .then(response => {
  + if (!response.ok) { // return blank profile if we fail to fetch
  + userData.profile = Object.assign({}, DEFAULT_PROFILE)
  + window.localStorage.setItem(
  + BLOCKSTACK_STORAGE_LABEL, JSON.stringify(userData))
  + resolve(userData)
  + } else {
  + response.text()
  + .then(responseText => JSON.parse(responseText))
  .then(wrappedProfile => extractProfile(wrappedProfile[0].token))
  .then(profile => {
  userData.profile = profile
  @@ -179,6 +191,8 @@ export function handlePendingSignIn(nameLookupURL: string = 'https://core.blocks
  BLOCKSTACK_STORAGE_LABEL, JSON.stringify(userData))
  resolve(userData)
  })
  + }
  + })
  } else {
  userData.profile = tokenPayload.profile
  window.localStorage.setItem(
  