Revision b15a0cc4 ui/static/snf/js/utils.js

b/ui/static/snf/js/utils.js
186 186
    
187 187
    synnefo.i18n.API_ERROR_MESSAGES = {
188 188
        'timeout': {
189
            'message': 'Timeout', 
190
            'allow_report': false
189
            'message': 'TIMEOUT', 
190
            'allow_report': false,
191
            'type': 'Network'
191 192
        },
192 193
        
193 194
        'error': {
......
328 329
        options = _.extend(options, {'details': details, 'message': error_message, 'ns': module, 'extra_details': extra});
329 330
        options = _.extend(options, call_settings);
330 331
        options = _.extend(options, synnefo.i18n.API_ERROR_MESSAGES[error_message] || {});
332
        
333
        if (window.ERROR_OVERRIDES && window.ERROR_OVERRIDES[options.message]) {
334
            options.message = window.ERROR_OVERRIDES[options.message];
335
        }
336

  
337
        if (options.code && window.ERROR_OVERRIDES && window.ERROR_OVERRIDES[code]) {
338
            options.message = window.ERROR_OVERRIDES[code];
339
        }
340

  
331 341
        options = _.extend(defaults, options);
332 342
        options.code = code;
333 343

  

Also available in: Unified diff