You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But in this package, it throws Hammerstone\Sidecar\Exceptions\LambdaExecutionException, so it is hard to detect if a URL has HTTP error respond code like 404, 500, etc. Is it possible to throw UnsuccessfulResponse in Lambda environment?
Thank you!
The text was updated successfully, but these errors were encountered:
Ideally, we could reuse the exit codes from Spatie's browser.js-code and do the same $exitCode check in BrowsershotLambda@callBrowser as Spatie does.
Right now, we do not differentiate between errors and body HTML here.
(Maybe I'm wrong and Sidecar already catches possible JavaScript/Node errors thrown in execSync. Then, result.toString() would always be the body HTML of a page. @aarondfrancis Do you have any insights about this?)
@phuclh You mention that you manually inspect the LambdaExecutionException. What exactly are you doing there right now? Do you re-throw the Spatie Exceptions? Are you able to share some code?
In the Spatie browsershot package, when using
preventUnsuccessfulResponse
method, it will throwUnsuccessfulResponse
exception:But in this package, it throws
Hammerstone\Sidecar\Exceptions\LambdaExecutionException
, so it is hard to detect if a URL has HTTP error respond code like404, 500, etc
. Is it possible to throwUnsuccessfulResponse
in Lambda environment?Thank you!
The text was updated successfully, but these errors were encountered: