@@ -13,6 +13,7 @@ import url from 'url'
13
13
import util from 'util'
14
14
import zlib from 'zlib'
15
15
16
+ import { renderFunctionErrorPage } from '@netlify/dev-utils'
16
17
import contentType from 'content-type'
17
18
import cookie from 'cookie'
18
19
import { getProperty } from 'dot-prop'
@@ -37,7 +38,6 @@ import { fileExistsAsync, isFileAsync } from '../lib/fs.js'
37
38
import { getFormHandler } from '../lib/functions/form-submissions-handler.js'
38
39
import { DEFAULT_FUNCTION_URL_EXPRESSION } from '../lib/functions/registry.js'
39
40
import { initializeProxy as initializeImageProxy , isImageRequest } from '../lib/images/proxy.js'
40
- import renderErrorTemplate from '../lib/render-error-template.js'
41
41
42
42
import { NETLIFYDEVLOG , NETLIFYDEVWARN , type NormalizedCachedConfigConfig , chalk , log } from './command-helpers.js'
43
43
import createStreamPromise from './create-stream-promise.js'
@@ -731,7 +731,7 @@ const initializeProxy = async function ({
731
731
const decompressedBody = await decompressResponseBody ( responseBody , proxyRes . headers [ 'content-encoding' ] )
732
732
const formattedBody = formatEdgeFunctionError ( decompressedBody , acceptsHtml )
733
733
const errorResponse = acceptsHtml
734
- ? await renderErrorTemplate ( formattedBody , '../../src/lib/templates/function-error.html' , 'edge function' )
734
+ ? await renderFunctionErrorPage ( formattedBody , 'edge function' )
735
735
: formattedBody
736
736
const contentLength = Buffer . from ( errorResponse , 'utf8' ) . byteLength
737
737
0 commit comments