Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NotFound when submodel not found within AAS #337

Merged
merged 6 commits into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


using AasxServer;
using AasxServerStandardBib.Exceptions;
using AasxServerStandardBib.Interfaces;
Expand Down Expand Up @@ -118,7 +118,7 @@ public void DeleteFileByPath(string aasIdentifier, string submodelIdentifier, st
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}
}

Expand All @@ -132,7 +132,7 @@ public void DeleteSubmodelById(string aasIdentifier, string submodelIdentifier)
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}
}

Expand All @@ -145,7 +145,7 @@ public void DeleteSubmodelElementByPath(string aasIdentifier, string submodelIde
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}

}
Expand Down Expand Up @@ -234,7 +234,7 @@ public List<ISubmodelElement> GetAllSubmodelElements(string aasIdentifier, strin
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}
}

Expand Down Expand Up @@ -406,7 +406,7 @@ public string GetFileByPath(string aasIdentifier, string submodelIdentifier, str
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}

}
Expand All @@ -421,7 +421,7 @@ public ISubmodel GetSubmodelById(string aasIdentifier, string submodelIdentifier
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}
}

Expand All @@ -435,7 +435,7 @@ public ISubmodelElement GetSubmodelElementByPath(string aasIdentifier, string su
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}
}

Expand All @@ -449,7 +449,7 @@ public ISubmodelElement CreateSubmodelElement(string aasIdentifier, string submo
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}
}

Expand All @@ -463,7 +463,7 @@ public ISubmodelElement CreateSubmodelElementByPath(string aasIdentifier, string
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}
}

Expand Down Expand Up @@ -494,7 +494,7 @@ public void ReplaceSubmodelById(string aasIdentifier, string submodelIdentifier,
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}

}
Expand All @@ -509,7 +509,7 @@ public void ReplaceSubmodelElementByPath(string aasIdentifier, string submodelId
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}
}

Expand All @@ -523,7 +523,7 @@ public void UpdateSubmodelById(string aasIdentifier, string submodelIdentifier,
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}
}

Expand All @@ -537,7 +537,7 @@ public void UpdateSubmodelElementByPath(string aasIdentifier, string submodelIde
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}
}

Expand All @@ -551,7 +551,7 @@ public void ReplaceFileByPath(string aasIdentifier, string submodelIdentifier, s
}
else
{
throw new($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
throw new NotFoundException($"Submodel with id {submodelIdentifier} NOT found in AAS with id {aasIdentifier}");
}
}

Expand Down
Loading