From 0a541ea3844672a6694f19f95db3597c18aea782 Mon Sep 17 00:00:00 2001 From: nathannwangg Date: Thu, 12 Dec 2024 19:44:57 -0600 Subject: [PATCH] Fixed bug in error checking code "402" instead of "404". Updated error alert messages to be a little more descriptive. --- .../HIScanAttendanceViewController.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/HackIllinois/ViewControllers/HIScanAttendanceViewController.swift b/HackIllinois/ViewControllers/HIScanAttendanceViewController.swift index 63ff7179..04d9574d 100644 --- a/HackIllinois/ViewControllers/HIScanAttendanceViewController.swift +++ b/HackIllinois/ViewControllers/HIScanAttendanceViewController.swift @@ -196,13 +196,13 @@ extension HIScanAttendanceViewController: AVCaptureMetadataOutputObjectsDelegate alertMessage = "You have successfully checked in." self.respondingToQRCodeFound = false case "QR code expired.": - alertMessage = "The code for this event has expired." + alertMessage = "The check-in code for this event has expired." case "NotFound": - alertMessage = "Could not find event." + alertMessage = "The event could not be found. Ensure the QR code is correct and try again." case "Invalid token.": - alertMessage = "Invalid token." + alertMessage = "Invalid token. You do not have the necessary permissions to check in." case "Internal server error.": - alertMessage = "Internal server error." + alertMessage = "An internal server error occurred. Please try again later." default: alertMessage = "Something isn't quite right." } @@ -270,7 +270,7 @@ extension HIScanAttendanceViewController: AVCaptureMetadataOutputObjectsDelegate self.handleStaffCheckInAlert(status: "Invalid token.") } else if rawErrorString.contains("code: 500") { self.handleStaffCheckInAlert(status: "Internal server error.") - } else if rawErrorString.contains("code: 402") { + } else if rawErrorString.contains("code: 404") { self.handleStaffCheckInAlert(status: "NotFound") } else { self.handleStaffCheckInAlert(status: "Something isn't quite right.")