This commit is contained in:
Adam Majer 2024-08-27 10:58:56 +02:00
parent b340368eb4
commit 1ceb74e461

View File

@ -36,7 +36,10 @@ var id int
func dumpUnhandledData(reqType string, data []byte) {
id++
os.WriteFile("/tmp/unhandled-json-"+reqType+"-"+fmt.Sprint(id)+".json", data, 0600)
if err := os.WriteFile(fmt.Sprintf("/tmp/unhandled-json-%s-%d.json", reqType,id), data, 0600); err != nil {
log.Printf("Cannot dump json. err: %v\n", err)
log.Println(string(data))
}
}
func parseRequestJSON(reqType string, data []byte) (org *common.Organization, extraAction string, err error) {