mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 12:37:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.557.0
This commit is contained in:
35
src/sdk/models/errors/plexapierror.ts
Normal file
35
src/sdk/models/errors/plexapierror.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
/** The base class for all HTTP error responses */
|
||||
export class PlexAPIError extends Error {
|
||||
/** HTTP status code */
|
||||
public readonly statusCode: number;
|
||||
/** HTTP body */
|
||||
public readonly body: string;
|
||||
/** HTTP headers */
|
||||
public readonly headers: Headers;
|
||||
/** HTTP content type */
|
||||
public readonly contentType: string;
|
||||
/** Raw response */
|
||||
public readonly rawResponse: Response;
|
||||
|
||||
constructor(
|
||||
message: string,
|
||||
httpMeta: {
|
||||
response: Response;
|
||||
request: Request;
|
||||
body: string;
|
||||
},
|
||||
) {
|
||||
super(message);
|
||||
this.statusCode = httpMeta.response.status;
|
||||
this.body = httpMeta.body;
|
||||
this.headers = httpMeta.response.headers;
|
||||
this.contentType = httpMeta.response.headers.get("content-type") || "";
|
||||
this.rawResponse = httpMeta.response;
|
||||
|
||||
this.name = "PlexAPIError";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user