424 Failed Dependency
WebDAV error where a request failed because a previous dependent request also failed.
When and Why to Use It
Section titled “When and Why to Use It”WebDAV specific. Use this when a bulk request fails because an earlier step in the chain failed.
Usage Examples
Section titled “Usage Examples”import { HttpException, get } from 'shokupan';
export const getResource = get('/resource', () => { throw new HttpException('Failed Dependency', 424);});import { Controller, Get, HttpException } from 'shokupan';
@Controller('/api')export class ExampleController { @Get('/resource') getResource() { throw new HttpException('Failed Dependency', 424); }}import express from 'express';const app = express();
app.get('/resource', (req, res) => { res.status(424).json({ error: 'Failed Dependency' });});import { Controller, Get, HttpException } from '@nestjs/common';
@Controller('api')export class ExampleController { @Get('resource') getResource() { throw new HttpException('Failed Dependency', 424); }}import Koa from 'koa';const app = new Koa();
app.use(async ctx => { if (ctx.path === '/resource' && ctx.method === 'GET') { ctx.status = 424; ctx.body = { error: 'Failed Dependency' }; }});