mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 21:53:43 +01:00
Log errors in requests to analytics
This commit is contained in:
@@ -9,7 +9,10 @@ makeRequest = (opts, callback)->
|
||||
if settings.apis?.analytics?.url?
|
||||
urlPath = opts.url
|
||||
opts.url = "#{settings.apis.analytics.url}#{urlPath}"
|
||||
request(opts)
|
||||
request opts, (err) ->
|
||||
if err?
|
||||
logger.err { err: err }, 'Request to analytics failed'
|
||||
|
||||
callback() # Do not wait for all the attempts
|
||||
else
|
||||
callback(new Errors.ServiceNotConfiguredError('Analytics service not configured'))
|
||||
|
||||
Reference in New Issue
Block a user