Skip to content

Commit

Permalink
feat: Add invalid value case for log reader (#47)
Browse files Browse the repository at this point in the history
Adds a check for "Invalid value" in log files
  • Loading branch information
Bobbyperson authored Aug 27, 2024
1 parent 1d8b074 commit 1cebeca
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions reaper/cogs/log_reading.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ async def on_message(self, message):
disabled_core_mod = False
double_barrel_crash = False
mod_problem = False
invalid_value = False
crash_counter = 0
filename = None
audio_list = []
Expand Down Expand Up @@ -242,6 +243,19 @@ async def on_message(self, message):
problem_found = True
framework_error = True

elif (
'Failed reading masterserver authentication response: encountered parse error "Invalid value."'
in line
):
dm_log.add_field(
name="",
value="Cloudflare issue: True",
inline=False,
)
logger.info("I found a CloudFlare issue >:(")
problem_found = True
invalid_value = True

# Check for audio replacements being loaded
# If 2 seperate mods replacing the same audio are enabled at the same time the game fucking kills itself
elif "Finished async read of audio sample" in line:
Expand Down Expand Up @@ -368,6 +382,13 @@ async def on_message(self, message):
inline=False,
)

if invalid_value:
problem.add_field(
name="Server setup error",
value="If you are trying to setup a server, you likely made an error while setting it up. Please double check your port forwarding and try again.",
inline=False,
)

if better_server_browser:
problem.add_field(
name="Better server browser",
Expand Down

0 comments on commit 1cebeca

Please sign in to comment.