Skip to content

Commit

Permalink
fix(responsehandler): Fix no helpers for internal server error specif…
Browse files Browse the repository at this point in the history
…ic case template
  • Loading branch information
oxyno-zeta committed Jul 3, 2021
1 parent a26e93f commit 13cb88e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkg/s3-proxy/response-handler/error-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,13 +428,21 @@ func (h *handler) InternalServerError(
// Check if target config and template exists
if tplCfgItem != nil {
// Load template content
tplContent, err2 = h.loadTemplateContent(
tpl, err3 := h.loadTemplateContent(
loadFileContent,
tplCfgItem,
)
// Concat
tplContent = tplContent + "\n" + tpl
// Save error
err2 = err3
} else {
// Get template from general configuration
tplContent, err2 = loadLocalFileContent(cfg.Templates.InternalServerError.Path)
tpl, err3 := loadLocalFileContent(cfg.Templates.InternalServerError.Path)
// Concat
tplContent = tplContent + "\n" + tpl
// Save error
err2 = err3
}
}

Expand Down

0 comments on commit 13cb88e

Please # to comment.