mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-15 08:40:34 +03:00
log more contextual data if possible on a 413
This commit is contained in:
parent
e6ffe7e520
commit
e891ee4da0
@ -6,6 +6,7 @@ import pathlib
|
||||
import re
|
||||
import sys
|
||||
import tkinter as tk
|
||||
from base64 import encode
|
||||
from collections import OrderedDict
|
||||
from os import SEEK_SET
|
||||
from os.path import join
|
||||
@ -246,7 +247,15 @@ class EDDN:
|
||||
return # We want to silence warnings otherwise
|
||||
|
||||
if r.status_code == 413:
|
||||
self._log_response(r, header_msg='Got a 413 while POSTing data', sent_data_len=str(len(encoded)))
|
||||
extra_data = {
|
||||
'schema_ref': msg.get('$schemaRef', 'Unset $schemaRef!'),
|
||||
'sent_data_len': str(len(encoded)),
|
||||
}
|
||||
|
||||
if '/journal/' in extra_data['schema_ref']:
|
||||
extra_data['event'] = msg.get('message', {}).get('event', 'No Event Set')
|
||||
|
||||
self._log_response(r, header_msg='Got a 413 while POSTing data', **extra_data)
|
||||
return # drop the error
|
||||
|
||||
if not self.UNKNOWN_SCHEMA_RE.match(r.text):
|
||||
|
Loading…
x
Reference in New Issue
Block a user