Skip to content

Commit

Permalink
Update @since annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
NSeydoux committed Jul 8, 2024
1 parent b3def2a commit dc9a140
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/clientError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/**
* Superclass of all errors thrown by Inrupt's client libraries.
*
* @since unreleased
* @since 0.0.1
*/
export class InruptClientError extends Error {}

Expand Down
8 changes: 4 additions & 4 deletions src/http/errorResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/**
* A subset of the {@link Response} type metadata.
*
* @since unreleased
* @since 0.0.1
*/
export type ResponseMetadata = Pick<
Response,
Expand All @@ -32,7 +32,7 @@ export type ResponseMetadata = Pick<
/**
* Relevant details of an HTTP error response.
*
* @since unreleased
* @since 0.0.1
*/
export type ErrorResponse = Readonly<
ResponseMetadata & {
Expand All @@ -45,7 +45,7 @@ export type ErrorResponse = Readonly<
* Extension to an Error thrown on an unsuccessful HTTP response
* to link to a {@link ErrorResponse} instance.
*
* @since unreleased
* @since 0.0.1
*/
export interface WithErrorResponse {
response: ErrorResponse;
Expand Down Expand Up @@ -80,7 +80,7 @@ function isErrorResponse(
* ```
*
* @alpha
* @since unreleased
* @since 0.0.1
* @param error the error being checked.
* @returns whether the error has HTTP error details attached.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/http/handleErrorResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import UnsupportedMediaTypeError, {
* @param message the error message
* @returns an instance of the ClientHttpError subclass matching the response metadata status.
* If the response status is unkown, the generic ClientHttpError class is used.
* @since unreleased
* @since 0.0.1
*/
export function handleErrorResponse(
responseMetadata: {
Expand Down
2 changes: 1 addition & 1 deletion src/http/httpError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { buildProblemDetails } from "./problemDetails";
* }
* ```
*
* @since unreleased
* @since 0.0.1
*/
export class ClientHttpError
extends InruptClientError
Expand Down
10 changes: 5 additions & 5 deletions src/http/problemDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ import type { ErrorResponse } from "./errorResponse";
/**
* The Problem Details MIME type documented in {@link https://www.rfc-editor.org/rfc/rfc9457}.
*
* @since unreleased
* @since 0.0.1
*/
export const PROBLEM_DETAILS_MIME = "application/problem+json";
/**
* The default type problem documented in {@link https://www.rfc-editor.org/rfc/rfc9457#name-aboutblank}.
*
* @since unreleased
* @since 0.0.1
*/
export const DEFAULT_TYPE = new URL("about:blank");

/**
* Structured representation of the issue underlying an error response
* from an HTTP API.
*
* @since unreleased
* @since 0.0.1
*/
export type ProblemDetails = Readonly<{
/**
Expand Down Expand Up @@ -68,7 +68,7 @@ export type ProblemDetails = Readonly<{
* Extension to an Error thrown on an unsuccessful HTTP response
* to link to a {@link ProblemDetails} instance.
*
* @since unreleased
* @since 0.0.1
*/
export interface WithProblemDetails {
/**
Expand Down Expand Up @@ -115,7 +115,7 @@ function isProblemDetails(
* ```
*
* @alpha
* @since unreleased
* @since 0.0.1
* @param error the error being checked.
* @returns whether the error has problem details attached.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/http/wellKnown/badRequestError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type BadRequestErrorResponse = ErrorResponse & {
* Runtime error thrown on HTTP Bad Request (400) response.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc9110#status.400 | RFC 9110 (15.5.1.) 400 Bad Request}
* @since unreleased
* @since 0.0.1
*/
export class BadRequestError extends ClientHttpError {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/http/wellKnown/conflictError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type ConflictErrorResponse = ErrorResponse & {
* Runtime error thrown on HTTP Conflict (409) response.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc9110#status.409 | RFC 9110 (15.5.10.) 409 Conflict}
* @since unreleased
* @since 0.0.1
*/
export class ConflictError extends ClientHttpError {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/http/wellKnown/forbiddenError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type ForbiddenErrorResponse = ErrorResponse & {
* Runtime error thrown on HTTP Forbidden (403) response.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc9110#status.403 | RFC 9110 (15.5.4.) 403 Forbidden}
* @since unreleased
* @since 0.0.1
*/
export class ForbiddenError extends ClientHttpError {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/http/wellKnown/goneError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type GoneErrorResponse = ErrorResponse & {
* Runtime error thrown on HTTP Gone (410) response.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc9110#status.410 | RFC 9110 (15.5.11.) 410 Gone}
* @since unreleased
* @since 0.0.1
*/
export class GoneError extends ClientHttpError {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/http/wellKnown/internalServerError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type InternalServerErrorResponse = ErrorResponse & {
* Runtime error thrown on HTTP Conflict (500) response.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc9110#status.500 | RFC 9110 (15.6.1.) 500 Internal Server Error}
* @since unreleased
* @since 0.0.1
*/
export class InternalServerError extends ClientHttpError {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/http/wellKnown/methodNotAllowedError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type MethodNotAllowedErrorResponse = ErrorResponse & {
* Runtime error thrown on HTTP Method Not Allowed (405) response.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc9110#status.405 | RFC 9110 (15.5.6.) 405 Method Not Allowed}
* @since unreleased
* @since 0.0.1
*/
export class MethodNotAllowedError extends ClientHttpError {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/http/wellKnown/notAcceptableError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type NotAcceptableErrorResponse = ErrorResponse & {
* Runtime error thrown on HTTP Not Acceptable (406) response.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc9110#status.406 | RFC 9110 (15.5.7.) 406 Not Acceptable}
* @since unreleased
* @since 0.0.1
*/
export class NotAcceptableError extends ClientHttpError {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/http/wellKnown/notFoundError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type NotFoundErrorResponse = ErrorResponse & {
* Runtime error thrown on HTTP Not Found (404) response.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc9110#status.404 | RFC 9110 (15.5.5.) 404 Not Found}
* @since unreleased
* @since 0.0.1
*/
export class NotFoundError extends ClientHttpError {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/http/wellKnown/preconditionFailedError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type PreconditionFailedErrorResponse = ErrorResponse & {
* Runtime error thrown on HTTP Precondition Failed (412) response.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc9110#status.412 | RFC 9110 (15.5.13.) 412 Precondition Failed}
* @since unreleased
* @since 0.0.1
*/
export class PreconditionFailedError extends ClientHttpError {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/http/wellKnown/tooManyRequestsError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type TooManyRequestsErrorResponse = ErrorResponse & {
* Runtime error thrown on HTTP Too Many Requests (429) response.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc6585#section-4 | RFC 6585 (4.) 429 Too Many Requests}
* @since unreleased
* @since 0.0.1
*/
export class TooManyRequestsError extends ClientHttpError {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/http/wellKnown/unauthorizedError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type UnauthorizedErrorResponse = ErrorResponse & {
* Runtime error thrown on HTTP Unauthorized (401) response.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc9110#status.401 | RFC 9110 (15.5.2.) 401 Unauthorized}
* @since unreleased
* @since 0.0.1
*/
export class UnauthorizedError extends ClientHttpError {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/http/wellKnown/unsupportedMediaTypeError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type UnsupportedMediaTypeErrorResponse = ErrorResponse & {
* Runtime error thrown on HTTP Unsupported Media Type (415) response.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc9110#status.415 | RFC 9110 (15.5.16.) 415 Unsupported Media Type}
* @since unreleased
* @since 0.0.1
*/
export class UnsupportedMediaTypeError extends ClientHttpError {
constructor(
Expand Down

0 comments on commit dc9a140

Please sign in to comment.