Skip to content

Commit

Permalink
fix(core): missing detail in error.log for non-Garden exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald authored and thsig committed Mar 13, 2019
1 parent ae98ba0 commit 7a0265d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion garden-service/src/exceptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

import { omit } from "lodash"

export interface GardenError {
type: string
message: string
Expand All @@ -27,7 +29,7 @@ export function toGardenError(err: Error | GardenError): GardenError {
if (err instanceof GardenBaseError) {
return err
} else {
const out = new RuntimeError(err.message, {})
const out = new RuntimeError(err.message, omit(err, ["message"]))
out.stack = err.stack
return out
}
Expand Down

0 comments on commit 7a0265d

Please sign in to comment.