mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-26 06:43:56 +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": {
|
||||
"description": "Unexpected error.",
|
||||
"content": {
|
||||
|
|
|
@ -26,7 +26,7 @@ class InvalidDomainException extends DomainException implements ProblemDetailsEx
|
|||
$e->detail = $e->getMessage();
|
||||
$e->title = self::TITLE;
|
||||
$e->type = self::TYPE;
|
||||
$e->status = StatusCodeInterface::STATUS_BAD_REQUEST;
|
||||
$e->status = StatusCodeInterface::STATUS_FORBIDDEN;
|
||||
|
||||
return $e;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,6 @@ class InvalidDomainExceptionTest extends TestCase
|
|||
self::assertEquals($expected, $e->getDetail());
|
||||
self::assertEquals('Invalid domain', $e->getTitle());
|
||||
self::assertEquals('INVALID_DOMAIN', $e->getType());
|
||||
self::assertEquals(400, $e->getStatus());
|
||||
self::assertEquals(403, $e->getStatus());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue