mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-28 04:22:04 +03:00
Documented error when trying to edit default domain redirects through endpoint
This commit is contained in:
parent
7c06633a67
commit
40a7d5a112
3 changed files with 12 additions and 2 deletions
|
@ -99,6 +99,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "Default domain was provided, and it cannot be edited this way.",
|
||||||
|
"content": {
|
||||||
|
"application/problem+json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../definitions/Error.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Unexpected error.",
|
"description": "Unexpected error.",
|
||||||
"content": {
|
"content": {
|
||||||
|
|
|
@ -26,7 +26,7 @@ class InvalidDomainException extends DomainException implements ProblemDetailsEx
|
||||||
$e->detail = $e->getMessage();
|
$e->detail = $e->getMessage();
|
||||||
$e->title = self::TITLE;
|
$e->title = self::TITLE;
|
||||||
$e->type = self::TYPE;
|
$e->type = self::TYPE;
|
||||||
$e->status = StatusCodeInterface::STATUS_BAD_REQUEST;
|
$e->status = StatusCodeInterface::STATUS_FORBIDDEN;
|
||||||
|
|
||||||
return $e;
|
return $e;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,6 @@ class InvalidDomainExceptionTest extends TestCase
|
||||||
self::assertEquals($expected, $e->getDetail());
|
self::assertEquals($expected, $e->getDetail());
|
||||||
self::assertEquals('Invalid domain', $e->getTitle());
|
self::assertEquals('Invalid domain', $e->getTitle());
|
||||||
self::assertEquals('INVALID_DOMAIN', $e->getType());
|
self::assertEquals('INVALID_DOMAIN', $e->getType());
|
||||||
self::assertEquals(400, $e->getStatus());
|
self::assertEquals(403, $e->getStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue