         modal.find('#contact-message').val('')
         modal.modal 'hide'
       , 1000
+    jqxhr.fail ->
+      return unless modal
+      if jqxhr.status is 500
+        modal.find('.sending-indicator').text $.i18n.t('loading_error.server_error')
+    return jqxhr
 
   send: (options={}) ->
     options.type = 'POST'

  sendContactMessage: (contactMessageObject, modal) ->
    # deprecated
    modal?.find('.sending-indicator').show()
    return $.post '/contact', contactMessageObject, (response) ->
      return unless modal
      modal.find('.sending-indicator').hide()
      modal.find('#contact-message').val('Thanks!')

      data: {teacherEmail, sessionId, levelName, codeLanguage: _.string.titleize(codeLanguage).replace('script', 'Script')}
    })
    return new Promise(jqxhr.then)
