35 lines
		
	
	
		
			870 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			870 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from __future__ import unicode_literals
 | 
						|
 | 
						|
import json
 | 
						|
from werkzeug.exceptions import BadRequest
 | 
						|
 | 
						|
 | 
						|
class ResourceNotFoundError(BadRequest):
 | 
						|
 | 
						|
    def __init__(self, message):
 | 
						|
        super(ResourceNotFoundError, self).__init__()
 | 
						|
        self.description = json.dumps({
 | 
						|
            "message": message,
 | 
						|
            '__type': 'ResourceNotFoundException',
 | 
						|
        })
 | 
						|
 | 
						|
 | 
						|
class UserNotFoundError(BadRequest):
 | 
						|
 | 
						|
    def __init__(self, message):
 | 
						|
        super(UserNotFoundError, self).__init__()
 | 
						|
        self.description = json.dumps({
 | 
						|
            "message": message,
 | 
						|
            '__type': 'UserNotFoundException',
 | 
						|
        })
 | 
						|
 | 
						|
 | 
						|
class NotAuthorizedError(BadRequest):
 | 
						|
 | 
						|
    def __init__(self, message):
 | 
						|
        super(NotAuthorizedError, self).__init__()
 | 
						|
        self.description = json.dumps({
 | 
						|
            "message": message,
 | 
						|
            '__type': 'NotAuthorizedException',
 | 
						|
        })
 |