Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧹 Remove debug prints that were left in and fix debug logging #5527

Merged
merged 5 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion static/js/appbundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -103970,7 +103970,7 @@ def note_with_error(value, err):
internetError: true
});
}
if (response.status !== 200) {
if (response.status >= 400) {
let errorMessage = await response.text();
try {
const parsed = JSON.parse(errorMessage);
Expand Down
4 changes: 2 additions & 2 deletions static/js/appbundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/js/comm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async function postJsonUsingFetch(url: string, data?: any): Promise<any> {
});
}

if (response.status !== 200) {
if (response.status >= 400) {
// The error message is:
// - response.error, if the response can be parsed as JSON
// - A generic error message if the response is too big (indicating we're probably getting an HTML page back here)
Expand Down
2 changes: 0 additions & 2 deletions website/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,7 @@ def show_bla(user):

@wraps(f)
def inner(*args, **kws):
print('session before', session)
just_logged_out = session.pop(JUST_LOGGED_OUT, False)
print('session after', session)
if not is_user_logged_in():
return redirect('/') if just_logged_out else utils.error_page(error=401)
# The reason we pass by keyword argument is to make this
Expand Down
3 changes: 0 additions & 3 deletions website/user_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def index(self, user):
user = self.db.user_by_username(user["username"])
if not user:
return {}, 304
print("\n\n TRACKING index \n\n")
body = request.json
data = []

Expand All @@ -58,8 +57,6 @@ def index(self, user):

data.append(data_row)

print(data)

try:
logger.log(data)
return make_response('', 204)
Expand Down
Loading