mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Merge pull request #348 from YunoHost/fix-text-error-formatting
replace backslash n with <br>
This commit is contained in:
commit
3f3fd2585f
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ export async function handleError (request, response, errorData) {
|
|||
let errorCode = response.status in errors ? response.status : undefined
|
||||
if (typeof errorData === 'string') {
|
||||
// FIXME API: Patching errors that are plain text or html.
|
||||
errorData = { error: errorData }
|
||||
errorData = { error: errorData.replace('\n', '<br>') }
|
||||
}
|
||||
if ('log_ref' in errorData) {
|
||||
// Define a special error so it won't get caught as a `APIBadRequestError`.
|
||||
|
|
Loading…
Reference in a new issue