Skip to content

Commit

Permalink
github issue 1806 (#1814)
Browse files Browse the repository at this point in the history
add load and save rewriting config
  • Loading branch information
chncaesar authored Aug 15, 2022
1 parent 783d1f8 commit 30b738d
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,23 +178,19 @@ class RestController extends ApplicationController with WowLog with Logging {
} catch {
case e: Exception =>
e.printStackTrace()
val msgBuffer = ArrayBuffer[String]()
if (paramAsBoolean("show_stack", false)) {
format_full_exception(msgBuffer, e)
}

val msg = ExceptionRenderManager.call(e).str.getOrElse( e.getMessage )

executeWithRetrying[HttpResponse](maxTries)(
RestUtils.httpClientPost(urlString,
Map("stat" -> s"""failed""",
"msg" -> (e.getMessage + "\n" + msgBuffer.mkString("\n")),
"msg" -> msg ,
"jobInfo" -> JSONTool.toJsonStr(jobInfo)),
callbackHeader),
HttpStatus.SC_OK == _.getStatusLine.getStatusCode,
response => logger.error(s"Fail SQL callback request failed after ${maxTries} attempts, " +
s"the last response status is: ${response.getStatusLine.getStatusCode}.")
)


}
})
} else {
Expand Down Expand Up @@ -239,8 +235,8 @@ class RestController extends ApplicationController with WowLog with Logging {
} catch {
case e: Exception =>
logError("An error occurred while the job manager was executing the task, ", e)
val msg = ExceptionRenderManager.call(e)
render(500, msg.str.get)
val msg = ExceptionRenderManager.call(e).str.getOrElse(e.getMessage)
render(500, msg)
} finally {
RequestCleanerManager.call()
cleanActiveSessionInSpark
Expand Down

0 comments on commit 30b738d

Please sign in to comment.