Skip to content

Commit

Permalink
Fail safe error message akka#3253
Browse files Browse the repository at this point in the history
1. Make sure we don't emit empty string
2. correct configuration
  • Loading branch information
sfali committed Sep 10, 2024
1 parent 9fb81d1 commit 948db31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ object StorageException {
)
} match {
case Failure(ex) =>
val errorMessage = emptyStringToOption(ex.getMessage)
StorageException(
statusCode = statusCode,
errorCode = Option(ex.getMessage).getOrElse("null"),
errorMessage = Option(response).getOrElse("null"),
errorCode = errorMessage.getOrElse("null"),
errorMessage = emptyStringToOption(response).orElse(errorMessage).getOrElse("null"),
resourceName = None,
resourceValue = None,
reason = None
Expand Down
6 changes: 2 additions & 4 deletions azure-storage/src/test/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ azurite {

akka {
http {
client {
parsing {
max-response-reason-length = 512
}
parsing {
max-response-reason-length = 512
}
}
}

0 comments on commit 948db31

Please sign in to comment.