[NETCONF-964] YangLib returns a 500 error if the requested SchemaSource is not available Created: 10/Feb/23 Updated: 06/Jun/23 Resolved: 06/Jun/23 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | netconf, restconf-nb |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Peter Suna | Assignee: | Šimon Ukuš |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
If a request is made to display a YANG model that is not loaded or if the request contains a typo, YangLib returns a 500 error instead of a useful response. The YangLibProvider handles this scenario by throwing an IllegalStateException with a message. This exception can be used in a way that results in a correct response. |
| Comments |
| Comment by Ivan Hrasko [ 02/Mar/23 ] |
|
PeterSuna "This exception can be used in a way that results in a correct response." What do you mean by "correct" response? |
| Comment by Peter Suna [ 02/Mar/23 ] |
|
Instead of throwing IllegalStateException exception, used one of those: |
| Comment by Šimon Ukuš [ 31/May/23 ] |
OriginalAfter 1st patch https://git.opendaylight.org/gerrit/c/netconf/+/105867After 2nd patch https://git.opendaylight.org/gerrit/c/netconf/+/106300 |