mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-24 00:06:16 -04:00
Updated clients to have a more robust error handling
- fire text and omg much more similar. Ready to be combined. - Error handling now for JSON valid responses
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
from app.clients import (Client, ClientException)
|
||||
|
||||
|
||||
class SmsClientException(ClientException):
|
||||
class SmsClientResponseException(ClientException):
|
||||
'''
|
||||
Base Exception for SmsClients
|
||||
Base Exception for SmsClientsResponses
|
||||
'''
|
||||
pass
|
||||
|
||||
def __init__(self, message):
|
||||
self.message = message
|
||||
|
||||
def __str__(self):
|
||||
return "Message {}".format(self.message)
|
||||
|
||||
|
||||
class SmsClient(Client):
|
||||
|
||||
Reference in New Issue
Block a user