2022-10-16 12:06:23 +00:00
from moto . core . exceptions import JsonRESTError
2019-08-31 09:08:12 +02:00
2022-10-16 12:06:23 +00:00
class ResourceNotFoundError ( JsonRESTError ) :
2022-11-01 09:33:01 -01:00
def __init__ ( self , message : str ) :
2022-10-16 12:06:23 +00:00
super ( ) . __init__ ( error_type = " ResourceNotFoundException " , message = message )
2021-10-14 22:20:56 +00:00
2022-10-16 12:06:23 +00:00
class InvalidNameException ( JsonRESTError ) :
2021-10-14 22:20:56 +00:00
message = " 1 validation error detected: Value ' {} ' at ' identityPoolName ' failed to satisfy constraint: Member must satisfy regular expression pattern: [ \\ w \\ s+=,.@-]+ "
2022-11-01 09:33:01 -01:00
def __init__ ( self , name : str ) :
2022-10-16 12:06:23 +00:00
msg = InvalidNameException . message . format ( name )
super ( ) . __init__ ( error_type = " ValidationException " , message = msg )