( uri: string, error: string, code: string = "ERROR", details?: any )
| 95 | * Create a resource error response object |
| 96 | */ |
| 97 | export function createResourceErrorResponse( |
| 98 | uri: string, |
| 99 | error: string, |
| 100 | code: string = "ERROR", |
| 101 | details?: any |
| 102 | ) { |
| 103 | return { |
| 104 | contents: [ |
| 105 | { |
| 106 | uri, |
| 107 | text: JSON.stringify(formatErrorResponse(error, code, details), bigIntReplacer, 2), |
| 108 | mimeType: "application/json", |
| 109 | }, |
| 110 | ], |
| 111 | }; |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * Create a resource success response object |
nothing calls this directly
no test coverage detected