Skip to content

Add micro service lastError tracking - #80

Open
matkomat-agent-2[bot] wants to merge 1 commit into
mainfrom
matkomat/issue-73-last-error
Open

matkomat-agent-2[bot] wants to merge 1 commit into
mainfrom
matkomat/issue-73-last-error

Conversation

@matkomat-agent-2

Copy link
Copy Markdown

Summary

  • add ServiceInterface::lastError() and service-level runtime error recording
  • centralize micro runtime error handling through recordError()
  • add focused integration coverage for handler failures, throwing error handlers, and automatic error-response send failures

Testing

  • vendor/bin/phpunit tests/Integration/Micro/ServiceTest.php

Closes #73

@matkomat matkomat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings.

Matches plan:

  • ServiceInterface exposes lastError(): ?\Throwable
  • Service stores and returns the latest runtime error through a single recordError() path
  • handler exceptions update endpoint stats and lastError()
  • automatic error-response send failures update lastError()
  • a throwing configured errorHandler does not break the main runtime error path
  • no unrelated lifecycle or API cleanup work was folded into this PR
  • src/Message.php was not modified

Verification:

  • vendor/bin/phpunit tests/Integration/Micro/ServiceTest.php
  • vendor/bin/phpunit tests/Integration/Micro/ServiceExtendedTest.php tests/Integration/Micro/StatsHandlerTest.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Micro Runtime Cleanup 3: Add service lastError() and centralize runtime error recording

1 participant