Skip to content

Instantly share code, notes, and snippets.

@cheeyeo
Created June 23, 2020 15:43
Show Gist options
  • Save cheeyeo/33a5c321b81ad5403822e468f7e965ec to your computer and use it in GitHub Desktop.
Save cheeyeo/33a5c321b81ad5403822e468f7e965ec to your computer and use it in GitHub Desktop.
Creating a boto3 ClientError manually!
raise ClientError(operation_name='InvalidKeyPair.Duplicate', error_response={
'Error': {
'Code': 'Duplicate',
'Message': 'This is a custom message'
}
}
)
@cmgg
Copy link

cmgg commented Nov 24, 2022

Thank you, this was really helpful for creating a MagicMock side effect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment