pull/618/head
Usama015 2023-06-19 16:04:13 +05:00
parent 0d40d067ae
commit a15d06e94f
1 changed files with 8 additions and 2 deletions

View File

@ -31,8 +31,14 @@ def handler(q=False):
if request['attribute']['type'] not in mispattributes['input']: if request['attribute']['type'] not in mispattributes['input']:
return {'error': 'Unsupported attribute type.'} return {'error': 'Unsupported attribute type.'}
ip = request['attribute']['value'] try:
apiKey = request['config']['apiKey'] ip = request['attribute']['value']
except Exception:
return {'error': 'Error Getting IP' + request}
try:
apiKey = request['config']['apiKey']
except Exception:
return {'error': 'Error Getting apiKey' + request}
return handle_ip(apiKey, ip, misperrors) return handle_ip(apiKey, ip, misperrors)
def handle_ip(apiKey, ip, misperrors): def handle_ip(apiKey, ip, misperrors):