Skip to content
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
7 changes: 3 additions & 4 deletions efile_app/efile/static/js/review.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ const APIHandlers = {
UIUpdater.updatePaymentMethodsSection(caseData.selected_payment_account, caseData.selected_payment_account_name || "Your payment");
await window.queryFees();
} catch (ex) {
console.log(ex);
console.error(ex);
UIUpdater.showAddNewPaymentMethod();
}
}
Expand Down Expand Up @@ -364,7 +364,6 @@ const UIUpdater = {
},

updatePaymentMethodsSection(account, account_name) {
console.log(account);
const container = Utils.getElement('paymentMethodsContainer');
let html = '<div class="payment-methods-list">';

Expand Down Expand Up @@ -446,7 +445,7 @@ const FilingHandler = {
const result = await this.processSubmission(userData, selectedPaymentMethod.getAttribute("value"));
this.handleSubmissionResult(result);
} catch (error) {
console.log("Error on submission: %o", error)
console.error("Error on submission: %o", error)
Messages.showError(gettext("An unexpected error occurred. Please try again."));
this.setSubmissionState(false);
}
Expand All @@ -462,7 +461,7 @@ const FilingHandler = {
const result = await this.processFees(userData, selectedPaymentMethod.getAttribute("value"));
this.handleFeesResponse(result);
} catch (error) {
console.log("Error on submission: %o", error)
console.error("Error on submission: %o", error)
Messages.showError(gettext("An unexpected error occurred. Please try again."));
this.setFeesState(false);
}
Expand Down
5 changes: 0 additions & 5 deletions efile_app/efile/templates/efile/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,8 @@ <h2>{% translate "View past filings" %}</h2>
result.data &&
Object.keys(result.data).length > 0
) {
console.log("existing: %o", result.data)
//TODO(brycew): return more here to bring user directly to old session
return true;
} else {
console.log("existing: %o", result.data)
}
return false;
}
Expand All @@ -112,8 +109,6 @@ <h2>{% translate "View past filings" %}</h2>
session_id: new_uuid,
jurisdiction: `{{jurisdiction}}`,
});

console.log("Saved data!")
} catch (error) {
console.warn('Error saving case data:', error);
// Session storage fallback is already in place
Expand Down
18 changes: 9 additions & 9 deletions efile_app/efile/views/api_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,16 @@ def get(self, request):
# Use the first available filing type to get components
if filing_types_data and len(filing_types_data) > 0:
filing_type_id = filing_types_data[0].get("value") or filing_types_data[0].get("code")
print(f"Using first available filing type: {filing_type_id}")
logger.info(f"Using first available filing type: {filing_type_id}")
else:
# Fallback to a common filing type ID
filing_type_id = "78690"
print(f"Using fallback filing type: {filing_type_id}")
logger.info(f"Using fallback filing type: {filing_type_id}")
else:
filing_type_id = "78690" # Fallback
print(f"Failed to get filing types, using fallback: {filing_type_id}")
logger.info(f"Failed to get filing types, using fallback: {filing_type_id}")

print(f"Getting filing components for court: {court}, filing_type: {filing_type_id}")
logger.info(f"Getting filing components for court: {court}, filing_type: {filing_type_id}")

# Build the Suffolk LIT Lab API URL
path = f"/jurisdictions/{jurisdiction}/codes/courts/{court}/filing_types/{filing_type_id}/filing_components"
Expand All @@ -137,17 +137,17 @@ def get(self, request):
filing_data = response.json()
return JsonResponse({"success": True, "data": filing_data})
else:
print(f"Suffolk API error: {response.status_code} - {response.text}")
logger.error(f"Suffolk API error: {response.status_code} - {response.text}")
return JsonResponse(
{"success": False, "error": f"Failed to fetch filing components: {response.status_code}"},
status=response.status_code,
)

except requests.RequestException as e:
print(f"Request error: {e}")
except requests.RequestException:
logger.exception("Request error")
return JsonResponse({"success": False, "error": "Failed to connect to filing components API"}, status=503)
except Exception as e:
print(f"Error getting filing components: {e}")
except Exception:
logger.exception("Error getting filing components")
return JsonResponse({"success": False, "error": "Server error occurred"}, status=500)


Expand Down