Merge pull request #25606 from overleaf/em-o-error-types

OError: handle unknown error types
GitOrigin-RevId: a52dd92a4f95cd738556612599805f41f24de69f
This commit is contained in:
Eric Mc Sween
2025-05-16 08:06:22 +00:00
committed by Copybot
parent 966cea3d8b
commit 2dd054d602
3 changed files with 40 additions and 10 deletions
@@ -268,6 +268,11 @@ describe('utils', function () {
expect(OError.getFullInfo(null)).to.deep.equal({})
})
it('works when given a string', function () {
const err = 'not an error instance'
expect(OError.getFullInfo(err)).to.deep.equal({})
})
it('works on a normal error', function () {
const err = new Error('foo')
expect(OError.getFullInfo(err)).to.deep.equal({})