Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ class OnlineCheckProvider(
res.type = TicketCheckProvider.CheckResult.Type.INVALID
} else {
val response = responseObj.data!!

if (responseObj.response.code == 400 && !response.has("status")) {
if (response.has("lists")) {
// Kind of a special case handling, but regular problem for users and just
// passing through the error messages from the server is not generally helpful
// since user's don't know what a primary key is etc
throw CheckException("Check-in list not found")
}
}

val status = response.getString("status")
if ("ok" == status) {
res.type = TicketCheckProvider.CheckResult.Type.VALID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ class ProxyCheckProvider(private val config: ConfigStore, httpClientFactory: Htt
e.printStackTrace()
TicketCheckProvider.CheckResult(TicketCheckProvider.CheckResult.Type.ERROR, e.message)
} catch (e: CheckException) {
TicketCheckProvider.CheckResult(TicketCheckProvider.CheckResult.Type.ERROR, e.message)
val r = TicketCheckProvider.CheckResult(TicketCheckProvider.CheckResult.Type.ERROR, e.message)
r.reasonExplanation = e.message
r
}
}

Expand Down
Loading