mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 07:07:21 +00:00
Compare commits
1 Commits
5cf45c30f4
...
fix/SP-163
Author | SHA1 | Date | |
---|---|---|---|
2b00dd0aac |
@ -333,7 +333,12 @@ export class SpaceService {
|
||||
.andWhere('space.disabled = :disabled', { disabled: false });
|
||||
|
||||
const space = await queryBuilder.getOne();
|
||||
|
||||
if (!space) {
|
||||
throw new HttpException(
|
||||
`Space with ID ${spaceUuid} not found`,
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
}
|
||||
return new SuccessResponseDto({
|
||||
message: `Space with ID ${spaceUuid} successfully fetched`,
|
||||
data: space,
|
||||
@ -343,7 +348,7 @@ export class SpaceService {
|
||||
throw error; // If it's an HttpException, rethrow it
|
||||
} else {
|
||||
throw new HttpException(
|
||||
'An error occurred while deleting the community',
|
||||
'An error occurred while fetching the space',
|
||||
HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user