conflict.duplicate

It would create something that exists: a taken handle or email, a second follow

Profile

Raised with

Status

409

Message

yours

Conflict intents

Example

TS
return fail('conflict.duplicate', 'That handle is already taken.');
The caller gets
Terminal
HTTP 409

{
"ok": false,
"error": "That handle is already taken.",
"code": "conflict.duplicate"
}

Choosing between neighbours

Find the row that describes your case, and use the intent on the right.

  • If it is

    Use

  • It would create something that exists: a taken handle or email, a second follow

    conflict.duplicate this page
  • A value that is fine on its own but clashes with existing data, like a taken handle

    rather than request.invalid
    conflict.duplicate this page

Connections

Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.

For registry authors

Starter intents. These are the intents prongs add errors puts in your registry, raised with fail(). Change the messages to suit your app, and the statuses through the status.* intents they are built from.

The entry prongs add errors writes into your registry. Change the message here, or the status through its status.* ref.

TS
'conflict.duplicate': {
kind: 'semantic',
description: 'It would create something that exists: a taken handle or email, a second follow',
refs: ['status.conflict'],
keywords: ['taken', 'exists', 'already', 'duplicate'],
binding: { publicMessage: 'That already exists.' },
},