chore(xapi/extractOpaqueRef): named function for better stacktraces
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
const OPAQUE_REF_RE = /OpaqueRef:[0-9a-z-]+/
|
||||
|
||||
module.exports = str => {
|
||||
module.exports = function extractOpaqueRef(str) {
|
||||
const matches = OPAQUE_REF_RE.exec(str)
|
||||
if (!matches) {
|
||||
throw new Error('no opaque ref found')
|
||||
|
||||
Reference in New Issue
Block a user