Skip to content

Commit

Permalink
feat: Log only ELK js error line (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger authored Jul 2, 2024
1 parent b95f27d commit 53c8803
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions capellambse_context_diagrams/_elkjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ def call_elkjs(elk_model: ELKInputData) -> ELKOutputData:
text=True,
env={**os.environ, "NODE_PATH": str(NODE_HOME)},
)
if proc.returncode:
log.getChild("node").error("%s", proc.stderr)
if proc.returncode or proc.stderr:
log.getChild("node").error("%s", proc.stderr.splitlines()[0])
raise NodeJSError("elk.js process failed")

return ELKOutputData.model_validate_json(proc.stdout, strict=True)
Expand Down

0 comments on commit 53c8803

Please sign in to comment.