mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-17 10:39:09 +00:00
lerna: split up bulk of packages
This commit is contained in:
parent
cb0b1d2410
commit
47a2e5694e
90 changed files with 0 additions and 0 deletions
15
packages/roleypoly-server/rpc/_error.js
Normal file
15
packages/roleypoly-server/rpc/_error.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
class RPCError extends Error {
|
||||
constructor (msg, code, ...extra) {
|
||||
super(msg)
|
||||
this.code = code
|
||||
this.extra = extra
|
||||
}
|
||||
|
||||
static fromResponse (body, status) {
|
||||
const e = new RPCError(body.msg, status)
|
||||
e.remoteStack = body.trace
|
||||
return e
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = RPCError
|
Loading…
Add table
Add a link
Reference in a new issue