diff --git a/_workers/websites-integration/functions/deployments/[id]/callback.ts b/_workers/websites-integration/functions/deployments/[id]/callback.ts index 8c8fc3705..0b87f3e22 100644 --- a/_workers/websites-integration/functions/deployments/[id]/callback.ts +++ b/_workers/websites-integration/functions/deployments/[id]/callback.ts @@ -28,8 +28,7 @@ export const onRequestPost: PagesFunction = async (context) => { return json( { id: paramId, - message: 'Callback failed, perhaps the deployment has already finished', - error, + message: 'Callback failed, perhaps the deployment has already been finished', }, { status: 400 }, ); diff --git a/_workers/websites-integration/functions/deployments/[id]/download-artifact.ts b/_workers/websites-integration/functions/deployments/[id]/download-artifact.ts index ec2f7ef19..e5245d929 100644 --- a/_workers/websites-integration/functions/deployments/[id]/download-artifact.ts +++ b/_workers/websites-integration/functions/deployments/[id]/download-artifact.ts @@ -23,9 +23,7 @@ export const onRequestGet: PagesFunction = async (context) => { state = await stub.getCurrentState(); } catch (error) { console.error(error); - - // @ts-ignore - return json({ id: paramId, message: 'Invalid state', error }, { status: 500 }); + return json({ id: paramId, message: 'Invalid state' }, { status: 500 }); } if (state.type === 'DONE' && state.artifactName) { diff --git a/_workers/websites-integration/functions/deployments/[id]/index.ts b/_workers/websites-integration/functions/deployments/[id]/index.ts index 1545d79c7..b6922f125 100644 --- a/_workers/websites-integration/functions/deployments/[id]/index.ts +++ b/_workers/websites-integration/functions/deployments/[id]/index.ts @@ -23,8 +23,7 @@ export const onRequestGet: PagesFunction = async (context) => { return json({ id: paramId, state }); } catch (error) { console.error(error); - - return json({ id: paramId, message: 'Invalid state', error }, { status: 500 }); + return json({ id: paramId, message: 'Invalid state' }, { status: 500 }); } }; @@ -55,9 +54,8 @@ export const onRequestPost: PagesFunction = async (context) => { return json({ id: paramId, run_id: params.run_id, message: 'Job is successfully bound' }); } catch (error) { console.error(error); - return json( - { id: paramId, run_id: params.run_id, message: 'Failed to bind job', error }, + { id: paramId, run_id: params.run_id, message: 'Failed to bind job' }, { status: 500 }, ); } diff --git a/_workers/websites-integration/functions/deployments/index.ts b/_workers/websites-integration/functions/deployments/index.ts index 32cdff7aa..383d052e2 100644 --- a/_workers/websites-integration/functions/deployments/index.ts +++ b/_workers/websites-integration/functions/deployments/index.ts @@ -25,8 +25,6 @@ export const onRequestPost: PagesFunction = async (context) => { }); } catch (err) { console.error(err); - - // @ts-ignore - return json({ message: err?.message || err.toString() }, { status: 500 }); + return json({ message: 'Failed to initialize a deployment' }, { status: 500 }); } };