-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from 0xsequence/tenant-not-found
Specify "tenant not found" error in ridl file
- Loading branch information
Showing
7 changed files
with
35 additions
and
17 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* eslint-disable */ | ||
// sequence-waas-authenticator v0.1.0 c02d115f8e54a1d15199e321aa744883a7c2946e | ||
// sequence-waas-authenticator v0.1.0 a753d63c2d2bbb862ca2c9efb16ba355b19a81aa | ||
// -- | ||
// Code generated by [email protected] with typescript generator. DO NOT EDIT. | ||
// | ||
|
@@ -12,7 +12,7 @@ export const WebRPCVersion = "v1" | |
export const WebRPCSchemaVersion = "v0.1.0" | ||
|
||
// Schema hash generated from your RIDL schema | ||
export const WebRPCSchemaHash = "c02d115f8e54a1d15199e321aa744883a7c2946e" | ||
export const WebRPCSchemaHash = "a753d63c2d2bbb862ca2c9efb16ba355b19a81aa" | ||
|
||
// | ||
// Types | ||
|
@@ -606,6 +606,19 @@ export class UnauthorizedError extends WebrpcError { | |
} | ||
} | ||
|
||
export class TenantNotFoundError extends WebrpcError { | ||
constructor( | ||
name: string = 'TenantNotFound', | ||
code: number = 1001, | ||
message: string = 'Tenant not found', | ||
status: number = 0, | ||
cause?: string | ||
) { | ||
super(name, code, message, status, cause) | ||
Object.setPrototypeOf(this, TenantNotFoundError.prototype) | ||
} | ||
} | ||
|
||
|
||
export enum errors { | ||
WebrpcEndpoint = 'WebrpcEndpoint', | ||
|
@@ -620,6 +633,7 @@ export enum errors { | |
WebrpcStreamLost = 'WebrpcStreamLost', | ||
WebrpcStreamFinished = 'WebrpcStreamFinished', | ||
Unauthorized = 'Unauthorized', | ||
TenantNotFound = 'TenantNotFound', | ||
} | ||
|
||
const webrpcErrorByCode: { [code: number]: any } = { | ||
|
@@ -635,6 +649,7 @@ const webrpcErrorByCode: { [code: number]: any } = { | |
[-9]: WebrpcStreamLostError, | ||
[-10]: WebrpcStreamFinishedError, | ||
[1000]: UnauthorizedError, | ||
[1001]: TenantNotFoundError, | ||
} | ||
|
||
export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// Server | ||
//go:generate go run github.com/webrpc/webrpc/cmd/webrpc-gen -schema=authenticator.ridl -target=golang -pkg=proto -server -client -out=./authenticator.gen.go | ||
//go:generate go run github.com/webrpc/webrpc/cmd/webrpc-gen -schema=authenticator.ridl -target=golang@v0.13.6 -pkg=proto -server -client -out=./authenticator.gen.go | ||
|
||
// Clients | ||
//go:generate go run github.com/webrpc/webrpc/cmd/webrpc-gen -schema=authenticator.ridl -target=golang -pkg=proto -client -out=./clients/authenticator.gen.go | ||
//go:generate go run github.com/webrpc/webrpc/cmd/webrpc-gen -schema=authenticator.ridl -target=golang@v0.13.6 -pkg=proto -client -out=./clients/authenticator.gen.go | ||
//go:generate go run github.com/webrpc/webrpc/cmd/webrpc-gen -schema=authenticator.ridl -target=typescript -client -out=./clients/authenticator.gen.ts | ||
|
||
package proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters