mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 14:46:49 +00:00
feature/Improve error handling at ConsentUtil
This commit is contained in:
parent
9e6b1440c2
commit
4c1b8f779d
@ -416,7 +416,7 @@ object Consent extends MdcLoggable {
|
||||
} catch { // Possible exceptions
|
||||
case e: ParseException => Failure("ParseException: " + e.getMessage)
|
||||
case e: MappingException => Failure("MappingException: " + e.getMessage)
|
||||
case e: Exception => Failure("parsing failed: " + e.getMessage)
|
||||
case e: Exception => Failure(ErrorUtil.extractFailureMessage(e))
|
||||
}
|
||||
case failure@Failure(_, _, _) =>
|
||||
failure
|
||||
@ -473,7 +473,7 @@ object Consent extends MdcLoggable {
|
||||
} catch { // Possible exceptions
|
||||
case e: ParseException => Future(Failure("ParseException: " + e.getMessage), Some(callContext))
|
||||
case e: MappingException => Future(Failure("MappingException: " + e.getMessage), Some(callContext))
|
||||
case e: Exception => Future(Failure("parsing failed: " + e.getMessage), Some(callContext))
|
||||
case e: Exception => Future(Failure(ErrorUtil.extractFailureMessage(e)), Some(callContext))
|
||||
}
|
||||
case failure@Failure(_, _, _) =>
|
||||
Future(failure, Some(callContext))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user