mirror of
				https://github.com/matrix-org/synapse.git
				synced 2025-11-04 10:11:05 +01:00 
			
		
		
		
	Stringify exceptions for keys/{query,claim}
Make sure we stringify any exceptions we return from keys/query and keys/claim, to avoid a 'not JSON serializable' error later Fixes #3010
This commit is contained in:
		
							parent
							
								
									c2a5cf2fe3
								
							
						
					
					
						commit
						a134c572a6
					
				@ -354,8 +354,11 @@ def _exception_to_failure(e):
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    # include ConnectionRefused and other errors
 | 
			
		||||
    #
 | 
			
		||||
    # Note that some Exceptions (notably twisted's ResponseFailed etc) don't
 | 
			
		||||
    # give a string for e.message, which simplejson then fails to serialize.
 | 
			
		||||
    return {
 | 
			
		||||
        "status": 503, "message": e.message,
 | 
			
		||||
        "status": 503, "message": str(e.message),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user