feat: Add API key support

This commit is contained in:
2023-06-20 01:47:00 +02:00
parent 5c1ed32cb6
commit eac88b2ec3
14 changed files with 406 additions and 75 deletions

View File

@ -52,6 +52,11 @@ export default interface RFC7807 {
instance?: string
}
/**
*
* @param error the error (base items are type, status, title details and instance)
* @returns
*/
export function buildRFC7807(error: RFC7807 & Record<string, any>): Response {
return new Response(JSON.stringify(error), {
headers: {