mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 03:14:40 -05:00
Seems like this should return null if it errors
This commit is contained in:
@@ -14,10 +14,10 @@ import java.io.IOException
|
|||||||
|
|
||||||
class JavalinGraphQLRequestParser : GraphQLRequestParser<Context> {
|
class JavalinGraphQLRequestParser : GraphQLRequestParser<Context> {
|
||||||
|
|
||||||
@Suppress("BlockingMethodInNonBlockingContext", "PARAMETER_NAME_CHANGED_ON_OVERRIDE")
|
@Suppress("PARAMETER_NAME_CHANGED_ON_OVERRIDE")
|
||||||
override suspend fun parseRequest(context: Context): GraphQLServerRequest = try {
|
override suspend fun parseRequest(context: Context): GraphQLServerRequest? = try {
|
||||||
context.bodyAsClass(GraphQLServerRequest::class.java)
|
context.bodyAsClass(GraphQLServerRequest::class.java)
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
throw IOException("Unable to parse GraphQL payload.")
|
null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user