Skip to content

Commit ec827fe

Browse files
committed
fix rval of AssetGet
1 parent e851486 commit ec827fe

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Intersect.Server/Web/Controllers/AssetManagement/AssetsController.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,11 @@ public IActionResult AssetGet([FromRoute] string? path = default)
134134
{
135135
_logger.LogError(exception, "Failed to retrieve results for {Path}", path);
136136

137-
object? data = $"An error occurred when retrieving results for {path}";
138137
#if DEBUG
139-
data = exception;
138+
return InternalServerError(exception);
139+
#else
140+
return InternalServerError($"An error occurred when retrieving results for {path}");
140141
#endif
141-
142-
if (data is string message)
143-
{
144-
return InternalServerError(message);
145-
}
146-
147-
return InternalServerError(data);
148142
}
149143
}
150144

0 commit comments

Comments
 (0)