Skip to content

Commit

Permalink
configd: T6608: report uncaught config script exceptions as commit error
Browse files Browse the repository at this point in the history
  • Loading branch information
jestabro committed Jul 30, 2024
1 parent 80c45be commit be47832
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/services/vyos-configd
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ def run_script(script_name, config, args) -> int:
explicit_print(session_out, session_mode, str(e))
return R_ERROR_COMMIT
except Exception as e:
logger.critical(e)
return R_ERROR_DAEMON
s = f'{type(e).__name__}: {str(e)}'
logger.error(s)
explicit_print(session_out, session_mode, s)
return R_ERROR_COMMIT

return R_SUCCESS

Expand Down

0 comments on commit be47832

Please sign in to comment.