mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	
							parent
							
								
									32bd95313a
								
							
						
					
					
						commit
						1c02d73c2c
					
				| @ -13,6 +13,7 @@ const legacyFeatureMapper = require('../data-helper/legacy-feature-mapper'); | |||||||
| const version = 1; | const version = 1; | ||||||
| 
 | 
 | ||||||
| const handleErrors = (req, res, error) => { | const handleErrors = (req, res, error) => { | ||||||
|  |     logger.warn('Error creating or updating feature', error); | ||||||
|     switch (error.constructor) { |     switch (error.constructor) { | ||||||
|         case NotFoundError: |         case NotFoundError: | ||||||
|             return res |             return res | ||||||
|  | |||||||
| @ -60,6 +60,7 @@ module.exports = function (app, config) { | |||||||
| 
 | 
 | ||||||
|         joi.validate(data, clientMetricsSchema, (err, cleaned) => { |         joi.validate(data, clientMetricsSchema, (err, cleaned) => { | ||||||
|             if (err) { |             if (err) { | ||||||
|  |                 logger.warn('Invalid metrics posted', err); | ||||||
|                 return res.status(400).json(err); |                 return res.status(400).json(err); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
| @ -81,6 +82,7 @@ module.exports = function (app, config) { | |||||||
| 
 | 
 | ||||||
|         joi.validate(data, clientRegisterSchema, (err, clientRegistration) => { |         joi.validate(data, clientRegisterSchema, (err, clientRegistration) => { | ||||||
|             if (err) { |             if (err) { | ||||||
|  |                 logger.warn('Invalid client data posted', err); | ||||||
|                 return res.status(400).json(err); |                 return res.status(400).json(err); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -9,6 +9,7 @@ const strategySchema = require('./strategy-schema'); | |||||||
| const version = 1; | const version = 1; | ||||||
| 
 | 
 | ||||||
| const handleError = (req, res, error) => { | const handleError = (req, res, error) => { | ||||||
|  |     logger.warn('Error creating or updating strategy', error); | ||||||
|     switch (error.name) { |     switch (error.name) { | ||||||
|         case 'NotFoundError': |         case 'NotFoundError': | ||||||
|             return res |             return res | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user