mirror of https://gitlab.com/bashrc2/epicyon
Handle json decode error
parent
de88136753
commit
d337f663d9
|
@ -24212,7 +24212,14 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return
|
return
|
||||||
|
|
||||||
# convert the raw bytes to json
|
# convert the raw bytes to json
|
||||||
|
try:
|
||||||
message_json = json.loads(message_bytes)
|
message_json = json.loads(message_bytes)
|
||||||
|
except json.decoder.JSONDecodeError as ex:
|
||||||
|
self._400()
|
||||||
|
print('EX: json decode error ' + str(ex) +
|
||||||
|
' from POST ' + str(message_bytes))
|
||||||
|
self.server.postreq_busy = False
|
||||||
|
return
|
||||||
|
|
||||||
fitness_performance(postreq_start_time, self.server.fitness,
|
fitness_performance(postreq_start_time, self.server.fitness,
|
||||||
'_POST', 'load json',
|
'_POST', 'load json',
|
||||||
|
|
Loading…
Reference in New Issue