MCPcopy Create free account
hub / github.com/codecombat/codecombat / onSessionPreloadError

Method onSessionPreloadError

app/views/play/CampaignView.js:1868–1874  ·  view source on GitHub ↗
(session, error)

Source from the content-addressed store, hash-verified

1866 }
1867
1868 onSessionPreloadError (session, error) {
1869 if (/requires a subscription to play/.test(error?.responseJSON?.message)) { return } // We handle this with SubscribeModal separately
1870 const levelElement = this.$el.find('.level-info-container:visible')
1871 if (session.levelSlug !== levelElement.data('level-slug')) { return }
1872 levelElement.find('.level-error-message').text(error.responseJSON?.message || `Cannot load this level--error ${error.statusCode || 500}`)
1873 levelElement.toggleClass('has-loading-error', true)
1874 }
1875
1876 highlightNextLevel () {
1877 this.highlightElement('.level.next', { delay: 500, duration: 60000, rotation: 0, sides: ['top'] })

Callers

nothing calls this directly

Calls 1

dataMethod · 0.80

Tested by

no test coverage detected