From 1bfcb17ae4fce01dd2676b3e6d462a04e6c29feb Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Mon, 12 Feb 2018 22:54:56 +0200 Subject: [PATCH] #389: log captcha init errors --- src/components/ui/form/Captcha.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ui/form/Captcha.js b/src/components/ui/form/Captcha.js index 02f080d..e7717a8 100644 --- a/src/components/ui/form/Captcha.js +++ b/src/components/ui/form/Captcha.js @@ -4,6 +4,7 @@ import React from 'react'; import classNames from 'classnames'; import captcha from 'services/captcha'; +import logger from 'services/logger'; import { skins, SKIN_DARK } from 'components/ui'; import { ComponentLoader } from 'components/ui/loader'; @@ -28,7 +29,7 @@ export default class Captcha extends FormInputComponent { captcha.render(this.el, { skin: this.props.skin, onSetCode: this.setCode - }).then((captchaId) => this.captchaId = captchaId); + }).then((captchaId) => this.captchaId = captchaId, (error) => logger.error('Error rendering captcha', { error })); }, this.props.delay); }