Logging and handling errors should be the job of the consumer, not @prismicio/manager.
In my specific case, I want to catch the error and try a different status. However, the console.error() signals to the user that something went wrong, despite this being an expected state.
Versions
Reproduction
Steps to reproduce
npx prismic-cli@latest login
slicemachine.config.json
.It pushes a custom type model with the
NEW
status twice. The second call should trigger an API error which gets logged to the console.What is expected?
The second
manager.prismicRepository.pushChanges()
call should throw an error, but it should not log to the console.What is actually happening?
manager.prismicRepository.pushChanges()
callsconsole.error()
when it encounters an API error.See these lines: https://github.com/prismicio/slice-machine/blob/b4d46f012cba0f46383e38a368eb419de667326b/packages/manager/src/managers/prismicRepository/PrismicRepositoryManager.ts#L404-L409
Logging and handling errors should be the job of the consumer, not
@prismicio/manager
.In my specific case, I want to catch the error and try a different
status
. However, theconsole.error()
signals to the user that something went wrong, despite this being an expected state.