This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import axios from 'axios' | |
| import toast from './toast' | |
| function errorResponseHandler(error) { | |
| // check for errorHandle config | |
| if( error.config.hasOwnProperty('errorHandle') && error.config.errorHandle === false ) { | |
| return Promise.reject(error); | |
| } | |
| // if has response show the error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import os | |
| import urllib.request | |
| def format_message(data): | |
| severity_level = get_severity_level(data['detail']['severity']) | |
| payload = { | |
| 'username': 'GuardDuty Finding', | |
| 'icon_emoji': ':guardduty:', | |
| 'text': '{} GuardDuty Finding in {}'.format(severity_level['mention'], data['detail']['region']), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /************************************************************************* | |
| * Get File Information | |
| */ | |
| // Assuming these come from some data source in your app | |
| $s3FileKey = 's3/key/path/to/file.ext'; | |
| $fileName = 'file.ext'; |