Skip to content

Commit

Permalink
feat: create problem type
Browse files Browse the repository at this point in the history
  • Loading branch information
imabp committed Jul 10, 2022
1 parent c978f14 commit 4b56d50
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/types/problem.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export const CONTENT_TYPE = "application/problem+json"

export type Problem = {
"Content-Type": string;
errorUrlPrefix:string,
status:number, // Status Code
type:string,
title: string, // Title should be description of Status Code if type is not present.
detail?: string,
instance?: string, // Details to reproduce the error.
parsedJSON?:object;
validationErrors?:object[];
location?:object[];
refs?:object[];
skipFields?:string[]; // fields to skip during construct statement.
[key:string]: any, // Custom Field of Problem
}

0 comments on commit 4b56d50

Please sign in to comment.