7 lines
		
	
	
		
			142 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			7 lines
		
	
	
		
			142 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 
								 | 
							
								export const errorThrowerMiddleware = () => next => action => {
							 | 
						||
| 
								 | 
							
								  if (action.error) {
							 | 
						||
| 
								 | 
							
								    throw action.payload;
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								  return next(action);
							 | 
						||
| 
								 | 
							
								};
							 |